olly at survex.com
Wed Feb 8 18:54:51 GMT 2006
On Wed, Feb 08, 2006 at 08:46:44AM -0500, Jim Lynch wrote:
> Thanks, now I want to extend omega to include variable proximity
> searches and added the following at the beginning of the run_query function:
> vector<string> myTerms;
If you're stemming at index time, then february -> februari here.
On Wed, Feb 08, 2006 at 11:14:29AM -0500, Jim Lynch wrote:
> I don't know if I figured out my problem or a way around it, but I've
> got something that works sort of. Instead of using strings, I
> generated Xapian::Query objects and put them in the vector. I used the
> query_parser method to generate the objects.
And the QueryParser stems by default which is why this approach works.
> My next question is what is the significance of the "pos" parameters in
> the following output from get_description()
> Xapian::Query(((toward:(pos=1) NEAR 11 posit:(pos=2)) OR less:(pos=3)))
> When I do it programmatically I get pos=1 for all. That didn't seem to
> make a difference in the results however I'd like to know what it means.
I think it's only used to list terms in "original query order" when you
ask for the terms matching a document. The query 'hello +world' becomes
'world AND_MAYBE hello', so the order isn't always preserved.
You can set it using the Query(TERM, WQF, POS) constructor:
More information about the Xapian-discuss