Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5219E9150 for ; Mon, 21 Nov 2011 01:35:59 +0000 (UTC) Received: (qmail 93586 invoked by uid 500); 21 Nov 2011 01:35:57 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 93549 invoked by uid 500); 21 Nov 2011 01:35:57 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 93541 invoked by uid 99); 21 Nov 2011 01:35:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2011 01:35:57 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of felipe.carvalho@gmail.com designates 209.85.160.176 as permitted sender) Received: from [209.85.160.176] (HELO mail-gy0-f176.google.com) (209.85.160.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2011 01:35:50 +0000 Received: by ghbg2 with SMTP id g2so3019457ghb.35 for ; Sun, 20 Nov 2011 17:35:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=7JHmGJTcQQO7ZCaqeKMgZm8JtYL1dCKcuqQh/zbSsIs=; b=I11BKfhP8Eh3tHsFf2D3Xkr1vULcWyvRQU3ssORUlNschLWXhZVSthCeukxPprCPZC XfQaqThVfPJ5T58w5kIlM6RquQlTjHvtn9rkT0RApfjze9XHKK9YMRIuDYAbzpw9p946 jMt2/m/+rmutc4bR3ku0IUzHU9XOe+GUTL3iE= Received: by 10.182.150.4 with SMTP id ue4mr2549280obb.74.1321839330191; Sun, 20 Nov 2011 17:35:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.39.3 with HTTP; Sun, 20 Nov 2011 17:35:08 -0800 (PST) From: Felipe Carvalho Date: Sun, 20 Nov 2011 23:35:08 -0200 Message-ID: Subject: Filtering search results To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=f46d04479685b9e79004b234b3c4 --f46d04479685b9e79004b234b3c4 Content-Type: text/plain; charset=ISO-8859-1 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! --f46d04479685b9e79004b234b3c4--