lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Sokolov" <soko...@ifactory.com>
Subject RE: How do I this in Solr?
Date Wed, 27 Oct 2010 11:43:30 GMT
You might try adding a field containing the word count and making sure that
matches the query's word count?

This would require you to tokenize the query and document yourself, perhaps.

-Mike 

> -----Original Message-----
> From: Varun Gupta [mailto:varun.vgupta@gmail.com] 
> Sent: Tuesday, October 26, 2010 11:26 PM
> To: solr-user@lucene.apache.org
> Subject: Re: How do I this in Solr?
> 
> Thanks everybody for the inputs.
> 
> Looks like Steven's solution is the closest one but will lead 
> to performance issues when the query string has many terms.
> 
> I will try to implement the two filters suggested by Steven 
> and see how the performance matches up.
> 
> --
> Thanks
> Varun Gupta
> 
> 
> On Wed, Oct 27, 2010 at 8:04 AM, scott chu (???) 
> <scott.chu@udngroup.com>wrote:
> 
> > I think you have to write a "yet exact match" handler 
> yourself (I mean 
> > yet cause it's not quite exact match we normally know). 
> Steve's answer 
> > is quite near your request. You can do further work based 
> on his solution.
> >
> > At the last step, I'll suggest you eat up all blank within query 
> > string and query result, respevtively & only returns those results 
> > that has equal string length as the query string's.
> >
> > For example, giving:
> > *query string = "Samsung with GPS"
> > *query results:
> > resutl 1 = "Samsung has lots of mobile with GPS"
> > result 2 = "with GPS Samsng"
> > result 3 = "GPS mobile with vendors, such as Sony, Samsung"
> >
> > they become:
> > *query result = "SamsungwithGPS" (length =14) *query results:
> > resutl 1 = "SamsunghaslotsofmobilewithGPS" (length =29) result 2 = 
> > "withGPSSamsng" (length =14) result 3 = 
> > "GPSmobilewithvendors,suchasSony,Samsung" (length =43)
> >
> > so result 2 matches your request.
> >
> > In this way, you can avoid case-sensitive, 
> word-order-rearrange load 
> > of works. Furthermore, you can do refined work, such as 
> remove white 
> > characters, etc.
> >
> > Scott @ Taiwan
> >
> >
> > ----- Original Message ----- From: "Varun Gupta" 
> > <varun.vgupta@gmail.com>
> >
> > To: <solr-user@lucene.apache.org>
> > Sent: Tuesday, October 26, 2010 9:07 PM
> >
> > Subject: How do I this in Solr?
> >
> >
> >  Hi,
> >>
> >> I have lot of small documents (each containing 1 to 15 
> words) indexed 
> >> in Solr. For the search query, I want the search results 
> to contain 
> >> only those documents that satisfy this criteria "All of 
> the words of 
> >> the search result document are present in the search query"
> >>
> >> For example:
> >> If I have the following documents indexed: "nokia n95", "GPS", 
> >> "android", "samsung", "samsung andriod", "nokia andriod", 
> "mobile with GPS"
> >>
> >> If I search with the text "samsung andriod GPS", search results 
> >> should only conain "samsung", "GPS", "andriod" and 
> "samsung andriod".
> >>
> >> Is there a way to do this in Solr.
> >>
> >> --
> >> Thanks
> >> Varun Gupta
> >>
> >>
> >
> >
> > 
> ----------------------------------------------------------------------
> > ----------
> >
> >
> >
> > %<&b6G$J0T.'$$'d(l/f,r!C
> > Checked by AVG - www.avg.com
> > Version: 9.0.862 / Virus Database: 271.1.1/3220 - Release Date: 
> > 10/26/10 14:34:00
> >
> >
> 


Mime
View raw message