You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by no...@frameweld.com on 2010/04/09 20:42:32 UTC
Questions about Solr
Hi, I would like to know the answer to the following:
- How am I able to use wildcard searches with Solr? EX: querying Ado with a result that would retrieve something like Adolescent.
- Phrase searches with stop words completely ruin the query and finds no results. How can I query something like "To be or not to be" with stop words enabled?
- I use synonyms for certain keywords. However, when I search for a specific phrase which does contain synonyms, results with the synonyms rank higher than the ones that have the exact term. How can that be fixed?
Thanks,
Noel
Re: Questions about Solr
Posted by Erik Hatcher <er...@gmail.com>.
Just a correction to what David says... text_rev is for allowing
wildcard at the beginning of a term, not the end. Wildcards at the
end work on standard text field types.
Erik
On Apr 9, 2010, at 3:08 PM, Smiley, David W. wrote:
> If the user query is not going to have wildcards then use NGrams. I
> talk about the black art of ngrams in my book. There are multiple
> ways of configuring it. If the query will have wildcards, Solr
> comes with a sample schema with a field type named, "text_rev" (I
> think that's what it's named) which supports wildcard searches such
> as "ado*". You could add the wildcard if it's not there. I've done
> this sort of thing with various boosting to get exact matches scored
> higher.
>
> For doing wildcards in a query string against NGram indexes, you'll
> have to wait till I am granted permission by my employer to open-
> source this (~2 months).
>
> ~ David Smiley
> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>
> On Apr 9, 2010, at 2:42 PM, <no...@frameweld.com>
> <no...@frameweld.com> wrote:
>
>> - How am I able to use wildcard searches with Solr? EX: querying
>> Ado with a result that would retrieve something like Adolescent.
>
>
>
>
>
>
>
Re: Questions about Solr
Posted by "Smiley, David W." <ds...@mitre.org>.
If the user query is not going to have wildcards then use NGrams. I talk about the black art of ngrams in my book. There are multiple ways of configuring it. If the query will have wildcards, Solr comes with a sample schema with a field type named, "text_rev" (I think that's what it's named) which supports wildcard searches such as "ado*". You could add the wildcard if it's not there. I've done this sort of thing with various boosting to get exact matches scored higher.
For doing wildcards in a query string against NGram indexes, you'll have to wait till I am granted permission by my employer to open-source this (~2 months).
~ David Smiley
Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
On Apr 9, 2010, at 2:42 PM, <no...@frameweld.com> <no...@frameweld.com> wrote:
> - How am I able to use wildcard searches with Solr? EX: querying Ado with a result that would retrieve something like Adolescent.