lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject Re: Does SOLR Allow q= (A or B) AND (C or D)?
Date Thu, 27 May 2010 23:32:51 GMT

> Thanks for the response again. The best way I could
> illustrate our live
> search feature is an example implementation:
> Notice when you search the word "senior" in the keywords
> field, the results
> filter down to just the job postings with that word in it.
> So it's not the same as an "autocomplete" type feature
> where as the user
> types in the search input box, their input is completed. We
> are just
> focusing on providing results with each key stroke. 
> If the user types "Ca",
> we will return anything with "Cat" in it. Thus we need the
> wildcard. As of
> now we send a query to solr of "Ca*".  However, solr
> can struggle with
> wildcards where it won't return a match on a word if there
> is a wildcard at
> the end of a fully-typed word. You have to leave off the
> last letter of that
> word and an asterisk to match it.

Okey i was referring the same. Each keystroke will return results.
There are many way to achieve this. Are you going to suggest from index/documents or from
coming queries? I mean do you have a separate index to capture most popular searches?

> We're attempting to do an "OR" search of the "term OR
> term*" anytime a user
> enters a term. 

term* is super set of term so you need to include/OR term in your query.

> Our need mix these "or" searches with an AND
> command is
> because if a user types two words, we are requiring both
> words be in the
> result to have a match.  

generally two ways: 
using wildcards on shingles (ShingleFilterFactory)
using EdgeNGramFilterFactory
can deal two or more words

Do you mind the order of words use types? Suggestions should come in order that the user types?


View raw message