[Xapian-discuss] refining search with PHP5

James Aylett james-xapian at tartarus.org
Tue Mar 24 17:00:14 GMT 2009


On Tue, Mar 24, 2009 at 05:49:48PM +0100, james cauwelier wrote:

> Now we want to add more refining options, eg. by language, cover language
> and release date.  How can I know which languages are available within a
> result set?  If I index the release date, how can I know which of the
> following groups are present in my result set?
> 
> - not released
> - will be released within the next 30 days
> - released in the last 30 days
> - released more than 30 days ago

On way of doing this is to place the release date in a value, and
configure the QueryParser to use the value range syntax. See
<http://xapian.org/docs/valueranges.html> for more detail. I believe
all the functionality should work fine from PHP5.

For languages, if you stash the language of a document in the document
data, you can grab that out of each match to find out the languages in
a (part of) the match set, although that's a bit messy. There may be a
better solution to this.

J

-- 
  James Aylett

  talktorex.co.uk - xapian.org - uncertaintydivision.org



More information about the Xapian-discuss mailing list