Good point. Since I might need such a query myself someday, how *IS* that done?


Dennis Gearon

Signature Warning
----------------
It is always a good idea to learn from your own mistakes. It is usually a 
better idea to learn from others’ mistakes, so you do not have to make them 
yourself. from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'

EARTH has a Right To Life,
  otherwise we all die.


--- On Tue, 10/26/10, Steven A Rowe <sar...@syr.edu> wrote:

> From: Steven A Rowe <sar...@syr.edu>
> Subject: RE: How do I this in Solr?
> To: "solr-user@lucene.apache.org" <solr-user@lucene.apache.org>
> Date: Tuesday, October 26, 2010, 11:46 AM
> Um, maybe I'm way off base, but when
> Varun said:
> 
> > If I search with the text "samsung andriod GPS",
> > search results should only conain "samsung", "GPS",
> > "andriod" and "samsung andriod".
> 
> I interpreted that to mean that hit documents should
> contain terms from the query, and nothing else.  Making
> all terms required doesn't do this.
> 
> Steve
> 
> > -----Original Message-----
> > From: Matthew Hall [mailto:mh...@informatics.jax.org]
> > Sent: Tuesday, October 26, 2010 2:30 PM
> > To: solr-user@lucene.apache.org
> > Subject: Re: How do I this in Solr?
> > 
> > Um.. you could change your default clause to AND
> rather than or.
> > 
> > That should do the trick.
> > 
> > Matt
> > 
> > On 10/26/2010 2:26 PM, Dennis Gearon wrote:
> > > Overkill?
> > >
> > > Dennis Gearon
> > >> I can't think of a way to do it without
> writing new
> > >> analysis filters.
> > >>
> > >> But I think you could do what you want with
> two filters
> > >> (this is untested):
> > >>
> > >> 1. An index-time filter that outputs a single
> token
> > >> consisting of all of the input tokens, sorted
> in a
> > >> consistent way, e.g.:
> > >>
> > >>     "mobile with GPS"
> ->  "GPS mobile
> > >> with"
> > >>     "samsung android"
> ->  "android
> > >> samsung"
> > >>
> > >> 2. A query-time filter that outputs one token
> per input
> > >> term combination, sorted in the same
> consistent way as the
> > >> index-time filter, e.g.:
> > >>
> > >>     "samsung andriod
> GPS"
> > >>       ->
> > >> "samsung","android","GPS",
> > >>          "android
> > >> samsung","GPS samsung","android GPS"
> > >>          "android
> GPS
> > >> samsung"
> > >>
> > >> Steve
> > >>
> > >>> -----Original Message-----
> > >>> From: Varun Gupta [mailto:varun.vgu...@gmail.com]
> > >>> Sent: Tuesday, October 26, 2010 9:08 AM
> > >>> To: solr-user@lucene.apache.org
> > >>> 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
> 
>

Reply via email to