elasticsearch


AND between tokens in elasticsearch


When I'm trying to search for a documents with such query (field indexed with Standard analyzer):
"query": {
"match": {
"Book": "OG/44"
}
}
I've got terms 'OG' and '44' and the result set will contain results where could be either of these terms. What analyzer/tokenizer I should use to get results when only both of terms are present?
You can set operator in match query (by default it is or)
"query": {
"match": {
"Book": {
"query": "OG/44",
"operator" : "and"
}
}
}
You have two tokens because standard analyzer tokenized them by slash, so if you need not this behaviour you can escape it

Related Links

It appears that we have not received any data for this cluster?
Removing From ElasticSearch by type last 7 day
Elasticsearch: accuracy on a filter aggregation
Wildcard query over _all field on Elasticsearch
Showing unmatched word in elasticsearch results
Elasticsearch: querying on both nested object properties and parent properties
elasticsearch first setup - create index
Using ElasticSearch as alternative data store with applications updating both the DB and ES(with the help of Kafka). Is this a good idea?
Where Elasticsearch store the data on Mac
Elastica - multiple bool queries - subqueries
How do i add boosting to the elasticsearch mapping in ONGR?
Is it possible to use doc_count as a term in elasticsearch?
Elastic search aggregation with sort
Elasticsearhc- how to do multi search request on Sense or Head plugin
How do I configure/initialize a custom Elasticsearch Tokenizer
Combining log entries with logstash

Categories

HOME
verification
apple-push-notifications
focus
adfs3.0
livecode
kendo-dropdown
paypal-ipn
bots
redmine
mongoid
docker-cloud
cypher
header
gentelella
flurry
implicit-conversion
turbojpeg
facebook-android-sdk
repair
tfs2010
selection
elastic-load-balancer
siesta
fullcalendar-scheduler
sslhandshakeexception
jpa-2.0
sonicwall
tomcat8
asciimath
exe
gmp
multiple-tables
bluemix-mobile-services
angular2-highcharts
stackexchange.redis
rxjs5
substring
ratio
opentext
introspection
ipa
uilocalnotification
acrobat
macromedia
sales
locks
python-2.x
seafile-server
autoencoder
dreamfactory
eclipse-gmf
export-to-pdf
suds
hypothesis-test
moinmoin
vesta
liteide
sony-future-lab-n
photoswipe
nonlinear-functions
webvtt
htmlspecialchars
algebra
asp.net-web-api-routing
mobile-angular-ui
case-when
openerp-6
deviare
jpda
seccomp
mathml
nsdata
cdo.message
jeasyui
vaadin4spring
apache-commons-digester
enaml
featuretoggle
espresso
ampersand
unidata
deque
htmltidy
debug-symbols
nanomsg
cout
window-resize
producer
igor
object-code
hyperloglog
non-ascii-characters
tfs-sdk
icenium
jquery-dialog
image-formats
kobold2d
flymake
multidrop-bus
litespeed
datacontracts
kohana-auth
photo-management
directshow.net
printqueue
efs
word-automation

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile