Opened 15 years ago

Last modified 5 years ago

#473 new enhancement

Add a posting source returning the documents matching a Query

Reported by: Richard Boulton Owned by: Not currently assigned
Priority: normal Milestone:
Component: Library API Version: git master
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

It might be helpful in some situations to be able to get the list of documents matching a Query as a posting source. This would allow a user to get hold of this list of documents as a stream, rather than having to run a full query. The most likely use would be to feed the list into another posting source, having done some filtering or modification of weights, but there may be other uses, too.

I have no immediate use for this feature, but I found an old patch implementing this, so thought I'd attach it to trac as a starting point if anyone else wants something similar in future. Not marking with a milestone - if you read this ticket and want this, please comment!

Attachments (1)

querypostingsource.patch (9.1 KB ) - added by Richard Boulton 15 years ago.
Old (probably non-functional) patch to implement this

Download all attachments as: .zip

Change History (2)

by Richard Boulton, 15 years ago

Attachment: querypostingsource.patch added

Old (probably non-functional) patch to implement this

comment:1 by Olly Betts, 5 years ago

Version: SVN trunkgit master

This is an interesting idea, and I'm sure has potential uses, but I wonder if we want to come up with a set of use cases so we can consider if this is the best solution.

We have several features which between them can do some of the things this could:

  • MatchSpy allows looking at the matching documents in a stream-like fashion, but it's "look but don't touch" - you can't modify and pass them on.
  • MatchDecider allows veto-ing potential matches, which allows filtering, but not modification of weight contributions.
  • PostingSource combined with the query via various operators allows contributing extra weight and filtering, but it's "on the side" not "in the flow".

The attached patch seems incomplete - a number of methods which should return values have empty implementations. It also would likely need some updates due changes in the underlying code.

Note: See TracTickets for help on using tickets.