lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Filtering search results
Date Mon, 21 Nov 2011 14:25:45 GMT
http://wiki.apache.org/solr/FieldCollapsing

On Mon, Nov 21, 2011 at 8:17 AM, Felipe Carvalho
<felipe.carvalho@gmail.com> wrote:
> Thanks for the tip, Erick! Any pointer to any article showing how to use it?
>
> Thanks
>
> On Mon, Nov 21http://wiki.apache.org/solr/FieldCollapsing, 2011 at 10:49 AM, Erick Erickson
<erickerickson@gmail.com>wrote:
>
>> You might take a look at grouping, aka field collapsing. Faceting gives
>> you counts for various values in a field, but not a mixture of documents,
>> whereas grouping will return you the top N members of each group
>> which sounds like what you're after.
>>
>> Best
>> Erick
>>
>> On Mon, Nov 21, 2011 at 5:04 AM, Ian Lea <ian.lea@gmail.com> wrote:
>> > Running two queries is fine, as is looping through the results list.
>> > I don't think it is clear that one in necessarily "better" than the
>> > other.  Faceting generally works by looping through results because
>> > you typically don't know in advance what values will be present.
>> >
>> > --
>> > Ian,
>> >
>> >
>> > 2011/11/21 liugangc <liugangc@gmail.com>:
>> >> hi,faceted search is like group by in SQL, and also need query two time
>> to get two list in your situation. I think there isn't  better way to solve
>> your problem.
>> >>
>> >> --
>> >> gang liu
>> >> email: liugangc@gmail.com
>> >>
>> >>
>> >>
>> >> At 2011-11-21 09:35:08,"Felipe Carvalho" <felipe.carvalho@gmail.com>
>> wrote:
>> >>>Hello,
>> >>>  I'm working on a people finder app over an index built of Person
>> >>>documents. Among other attributes (name, gender, phone, ...) I have a
>> >>>hiringType attribute, which possible values are EMPLOYEE and CONSULTANT.
>> >>>  When I run a "name" search over these documents, I need to render
two
>> >>>lists: employees that match the search criteria and consultants that
>> match
>> >>>the criteria.
>> >>>  I'm running Lucene 3.4, is there a way for Lucene to hand me over
>> those
>> >>>lists of documents separately on the same query?
>> >>>  Currently I run the query and then loop through the results,
>> separating
>> >>>employees and consultants in two lists, is there a better way to do
>> this?
>> >>>  A heard a colleague saying Solr supports this through "faceted search"
>> >>>(I'm not sure this is the right name), is there such thing on Lucene
as
>> >>>well? (unfortunately using Solr is not an option for this app)
>> >>>
>> >>>Thanks!
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> > For additional commands, e-mail: java-user-help@lucene.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>

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


Mime
View raw message