That was the answer I was looking for, I will try that one out

Thanks Daniel

-----Original Message-----
From: Daniel Papasian [mailto:[EMAIL PROTECTED]
Sent: 01 April 2008 16:03
To: solr-user@lucene.apache.org
Subject: Re: matching exact/whole phrase

Sandeep Shetty wrote:
> Hi people,
>
> I am looking to provide exact phrase match, along with the full text
> search with solr.  I want to achieve the same effect in solr rather
> than use a separate SQL query. I want to do the following as an
> example
>
> The indexed field has the text "car repair" (without the double
> quotes)  for a document and I want this document to come in the
> search result only if someone searches for "car repair". The document
> should not show up for "repair" and "car" searches.
>
> Is it possible to do this type of exact phrase matching if needed
> with solr itself?

It sounds like you want to do an exact string match, and not a text
match, so I don't think there's anything complex you'd need to do...
just store the field with "car repair" as type="string" and do all of
the literal searches you want.

But if you are working off a field that contains something beyond the
exact match of what you want to search for, you'll just need to define a
new field type and use only the analysis filters that you need, and
you'll have to think more about what you need if that's the case.

Daniel

Sandeep Shetty
Technical Development Manager

Touch Local
89 Albert Embankment, London, SE1 7TP, UK
D: 020 7840 4335
E: [EMAIL PROTECTED]
T: 020 7840 4300
F: 020 7840 4301 

This email is confidential and may also be privileged. If you are not the 
intended recipient please notify us immediately by calling 020 7840 4300 or 
email [EMAIL PROTECTED] You should not copy it or use it for any purpose nor 
disclose its contents to any other person. Touch Local Ltd cannot accept 
liability for statements made which are clearly the sender's own and are not 
made on behalf of the firm.
Registered in England and Wales. Registration Number: 2885607 VAT Number: 
GB896112114

Help to save some trees. Print e-mails only if you really need to.

Reply via email to