Reputation: 53
I am using edismax query in solr as below
qf = search
search field contain following data
audi
bmw
land rover
aston martin
search only work for one word
ie.
q = bmw audi
produces result with following data
bmw
audi
q = bmw land rover
it does not give anything in result, but
q = audi "land rover"
return desired result
Is it possible that i will get result just by typing
q = audi land rover
Please help.
Upvotes: 0
Views: 71
Reputation: 1301
When you are indexing your data, you have to use an analyzer like WhiteSpaceTokenizer
as describe in Solr documentation:
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
</analyzer>
This will index tokens like audi
, land
, rover
, ...
Upvotes: 1
Reputation: 2787
You can use AND
and OR
in solr (lucene)
q = audi OR "land rover"
Please try this one
Upvotes: 0