lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] jeme edited a comment on issue #431: Query/Filter Casting
Date Thu, 29 Jul 2021 05:48:46 GMT

jeme edited a comment on issue #431:
URL: https://github.com/apache/lucenenet/issues/431#issuecomment-888821631


   After a little investigation, is this even worth pursuing?. I am lacking some examples
to illustrate why you would want this.
   
   ### MoreLikeThis.Like()
   
   Actually returns a BooleanQuery, but from a interface perspective, all you should really
care about is that it produces a Query object that when used for searching will return documents
that a similar to a specific document. (I am not quite sure of the usage of the overload you
mentioned here) - Essentially, what type of Query would fulfill that requirement is an implementation
detail and shouldn't concern the developer.
   
   ### Query.Rewrite() AND IndexSearcher.Rewrite()
   
   As the later really just delegates to the former, ill take these together.
   
   Rewrite is a way of trying to optimize the Query, again you should not care about what
type of Query is returned, just that it performs the same basic function as the original Query
but in a better way, what that means should again be an underlying implementation detail a
developer shouldn't be concerned with.
   
   I guess the BooleanQuery is the most "straight to the point" example of this, if a BooleanQuery
only contains a single clause, there is no need for the BooleanQuery it self, so this is eliminated
in a rewrite process by pulling out the single clause, rewriting the Query object in that
and then returning that Query object.
   
   ### Filter.GetDocIdSet()
   
   I am not no familiar with this method, so I can't comment here specifically yet, would
need more time, but it's again certainly not a straight forward task. But there doesn't seem
to be many cases where a specific type is expected in the code, instead in some places where
it is type checked it causes a branching instead. So is the abstraction here again not specifically
done intentionally?.
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message