lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luther blisset <>
Subject Searching substring starting at a fixed position
Date Thu, 11 Sep 2008 11:34:35 GMT

hi folks,
I'm new to Lucene and I'm looking for a way to search a substring that
starts at a fixed position.
It isn't a classical substring search because it's a bit weird.
I indexed a field that represents the avability of a room in a hostal during
1 year.
The field is composed by 365 digits and each digit represents 1 day and it
can be set at 0 (available) or 1 (not available). Thus a string like this:
110001111...(continues with ones until the position 365)
means that the hostal is available from 3rd until 5th of January.
And now the problem...
Suppose that I want to search if an hostal is available from 3rd to 5th of
I'd have to use wildcards and search a string like this:
??000????...(continues with ? until the position 365)
I think this way is not a good one and is too bad for the application
Is there a way to ask Lucene to search starting from a fixed position?
For instance, regard to the example above, could I search a 000 starting to
search at the third position?
I hope all was clear and you can help me because I've no idea how to solve
the problem.
Thanks a lot!

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message