lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Papasian <daniel.papas...@chronicle.com>
Subject Re: matching exact/whole phrase
Date Tue, 01 Apr 2008 15:02:42 GMT
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

Mime
View raw message