lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Lea" <>
Subject Re: Searching repeating fields
Date Tue, 18 Nov 2008 20:06:36 GMT
How about using variable field names?

 page_description: cnn breaking news
 page_title_ajax: news
 page_title_paris: cnn news
 page_title_daniel: homepage
 username: ajax
 username: paris
 username: daniel

and search for +user:ajax +page_title_ajax:news or maybe just
page_title_ajax:news.  Might not even need to store user.


On Tue, Nov 18, 2008 at 5:48 PM, Mark Ferguson
<> wrote:
> Hello,
> I am designing an index in which one url corresponds to one document. Each
> document also contains multiple parallel repeating fields. For example:
> Document 1:
>  url:
>  page_description: cnn breaking news
>  page_title: news
>  page_title: cnn news
>  page_titel: homepage
>  username: ajax
>  username: paris
>  username: daniel
> In this contrived example, user 'ajax' have saved the URL with the page
> title 'news', 'paris' has saved it with 'cnn news', and 'daniel' has saved
> it with 'homepage'.
> What I need to be able to do is perform a search for a particular user and a
> particular title, but they must occur together. For example, +user:ajax
> +page_title:news would return this document, but +user:ajax
> +page_title:homepage would not.
> I am open to changing the design of the document (i.e. using repeating
> fields isn't required), but I do need to have one document per url. I am
> looking for suggestions for a strategy on implementing this requirement.
> Thanks,
> Mark Ferguson

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message