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 Mohammad Shariq <sh...@gmail.com> on 2011/06/27 12:12:00 UTC

Solr PhraseSearch and ExactMatch

Hello,
I am using solr1.4 on ubuntu 10.10.
Currently I got the requirement to do the ExactMatch  for PhraseSearch.
I tried googling but I did'nt got the exact solution.

I am doing the search on 'text' field.
if I give the search query :
http://localhost:8983/solr/select/?q="the search agency" <http://localhost>

It apply the stopWordsFilter and remove the 'the' word from query, but my
requirement is to do the ExactMatch.
please suggest me the right solution to this problem.

-- 
Thanks and Regards
Mohammad Shariq

Re: Solr PhraseSearch and ExactMatch

Posted by Ahmet Arslan <io...@yahoo.com>.
> I can use 'String' instead of 'Text'
> for exact match, but I need ExactMatch
> only on PhraseSearch.

I got your point. Your best bet can be crate an extra field field populated via copyField declaration. Type of this new field won't have stemming, stop-word removal etc. (according to your exact match definition)

Whenever you receive a PhraseQuery, query on this new field. This can be done on the client side. 

Re: Solr PhraseSearch and ExactMatch

Posted by Mohammad Shariq <sh...@gmail.com>.
I can use 'String' instead of 'Text' for exact match, but I need ExactMatch
only on PhraseSearch.

On 27 June 2011 16:29, Gora Mohanty <go...@mimirtech.com> wrote:

> On Mon, Jun 27, 2011 at 3:42 PM, Mohammad Shariq <sh...@gmail.com>
> wrote:
> > Hello,
> > I am using solr1.4 on ubuntu 10.10.
> > Currently I got the requirement to do the ExactMatch  for PhraseSearch.
> > I tried googling but I did'nt got the exact solution.
> >
> > I am doing the search on 'text' field.
> > if I give the search query :
> > http://localhost:8983/solr/select/?q="the search agency" <
> http://localhost>
> >
> > It apply the stopWordsFilter and remove the 'the' word from query, but my
> > requirement is to do the ExactMatch.
> > please suggest me the right solution to this problem.
> [...]
>
> Use a "string" field which does not have any analyzers, and
> tokenizers.
>
> Regards,
> Gora
>



-- 
Thanks and Regards
Mohammad Shariq

Re: Solr PhraseSearch and ExactMatch

Posted by Gora Mohanty <go...@mimirtech.com>.
On Mon, Jun 27, 2011 at 3:42 PM, Mohammad Shariq <sh...@gmail.com> wrote:
> Hello,
> I am using solr1.4 on ubuntu 10.10.
> Currently I got the requirement to do the ExactMatch  for PhraseSearch.
> I tried googling but I did'nt got the exact solution.
>
> I am doing the search on 'text' field.
> if I give the search query :
> http://localhost:8983/solr/select/?q="the search agency" <http://localhost>
>
> It apply the stopWordsFilter and remove the 'the' word from query, but my
> requirement is to do the ExactMatch.
> please suggest me the right solution to this problem.
[...]

Use a "string" field which does not have any analyzers, and
tokenizers.

Regards,
Gora