You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Jeff French <je...@mdbconsulting.com> on 2007/08/13 05:26:48 UTC

Nested concept fields

I'm trying to index concepts within a document, and search them within the
context of a multivalued field. I'm not even sure it's possible with the
QueryParser or QsolParser syntax. Does anyone know if it is / is not
possible? If not, is it conceptually possible using the Query API?

What I'd like to do: I'm currently indexing sentences as individual 'sent'
fields. I plan to create indices on other information I parse out of a
document (e.g. numerics, people names, company names). Suppose I call my
numeric index 'num'. Then I would like to do something like this (in search
pseudocode):

	sent:(expired num[1 TO 5] "days ago")

I don't see how to do this using either Lucene's QueryParser or the
QsolParser. Is it possible to do it using the Query API (and the appropriate
indexing changes)?

Thanks for any pointers.

    Jeff
-- 
View this message in context: http://www.nabble.com/Nested-concept-fields-tf4258984.html#a12120367
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: Nested concept fields

Posted by Chris Hostetter <ho...@fucit.org>.
: 	sent:(expired num[1 TO 5] "days ago")
:
: I don't see how to do this using either Lucene's QueryParser or the
: QsolParser. Is it possible to do it using the Query API (and the appropriate
: indexing changes)?

take a look at Span queries, particularly SpanNearQuery ... that can do
pretty much everything you describe assuming creative indexing.  the one
thing that's not quite ready made would be the range query -- you'd need
to write a kind of SpanRangeQuery that rewrite itself into a SpanOrQuery
containing all of the numbers in the range.



-Hoss


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