lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject RE: complex searche (newbie)
Date Fri, 27 Aug 2004 18:27:30 GMT
This should work:

http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/IndexSearcher.html#search(org.apache.lucene.search.Query,%20org.apache.lucene.search.Filter,%20int,%20org.apache.lucene.search.Sort)

Otis

--- Wermus Fernando <fernando.wermus@xlnet.net.ar> wrote:

> Thanks :)
> 
> 	It Works :) . One more question. I need to order the hits by a
> field in contact called lastname. What do I have to add to the query?
> 
> 
> 
> 
> -----Mensaje original-----
> De: Bernhard Messer [mailto:Bernhard.Messer@intrafind.de] 
> Enviado el: Jueves, 26 de Agosto de 2004 02:17 p.m.
> Para: Lucene Users List
> Asunto: Re: complex searche (newbie)
> 
> hi,
> 
> in general the query parser doesn't allow queries which start with a 
> wildcard Those queries could end up with very long response times and
> 
> block your system. This is not what you want.
> 
> I'm not sure if i understand what you want to do. I expect that you
> have
> 
> a field within a lucene document with name "type". For this field you
> 
> can have different values like "contact,account" etc. Now you want to
> 
> search all documents where type is "contact". So the query to do this
> 
> would be "type:contact", nothing else is required.
> 
> can you try that and give some feedback ?
> 
> best regards
> Bernhard
> 
> 
> Wermus Fernando wrote:
> 
> >I am using multifieldQueryParse to look up some models. I have
> several
> >models: account, contacts, tasks, etc. The user chooses models and a
> >query string to look up. Besides fields for searching, I add some
> >conditions to the query string.
> > 
> >If he puts "john" to look up and chooses contacts, I add to the
> query
> >string the following
> > 
> >Query string: "john and type:contact"
> > 
> >But, If he wants to look up any contact, multifieldQueryParse throws
> an
> >exception. In these case, the query string is the following:
> > 
> >Query string: "* and type:contact"
> > 
> >Am I choosing the wrong QueryParser or is there another easy way to
> look
> >up several fields and the same time any content?
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message