lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Range search in dependent collections
Date Mon, 23 Feb 2009 15:10:10 GMT
Just repeat the first and last names in each document.  How many users
and jobs are you talking about?  Lucene will cope unless the numbers
are extremely large.

Note that I'm not claiming this is necessarily the "best" way, just
the simplest which is often, but not always, the best.


--
Ian.

On Mon, Feb 23, 2009 at 2:49 PM, Mykola Peleshchyshyn
<mpeleschyshyn@yahoo.com> wrote:
> What about the case with several jobs? I.e.:
>
> firstname: whatever
> lastname: whatever
>
> jobtitle1: somejob
> startdate1: whenever
> enddate1: whenever
> .............................................
> jobtitleN: somejob
> startdateN: whenever
> enddateN: whenever
>
>
>
> ----- Original Message ----
> From: Ian Lea <ian.lea@gmail.com>
> To: java-user@lucene.apache.org
> Sent: Monday, February 23, 2009 4:14:37 PM
> Subject: Re: Range search in dependent collections
>
> Hi
>
>
> The simplest way is to flatten your data into lucene documents that
> hold all relevant info for user/job combinations.  That will let you
> search easily across whichever fields you want.
>
> Your documents could look like this:
>
> firstname: whatever
> lastname: whatever
> jobtitle: somejob
> startdate: whenever
> enddate: whenever
>
> and searches could be something like lastname:whatever jobtitle:somejob.
>
>
> --
> Ian.
>
>
> On Mon, Feb 23, 2009 at 9:12 AM, Mykola Peleshchyshyn
> <mpeleschyshyn@yahoo.com> wrote:
>> Hello,
>> I'm new to Lucene and I have the following problem:
>>
>> I have a Users with first name, last name etc. and User Jobs (collection) with job
title, start date, end date.
>>
>> I need to perform search on all user fields (fist name, last name etc) and job fields
(job title and optionally start date and end date).
>>
>> What would be the best way to index and search this data?
>>
>> Thank you,
>> Mykola Peleshchyshyn

---------------------------------------------------------------------
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