You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "expani (via GitHub)" <gi...@apache.org> on 2024/05/20 07:25:35 UTC

[PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

expani opened a new pull request, #13385:
URL: https://github.com/apache/lucene/pull/13385

   ### Description
   A [bug](https://github.com/opensearch-project/OpenSearch/issues/13616) was reported in OpenSearch which caused Interval Queries containing sub-query in rules to fail with `Sub-iterators of ConjunctionDISI are not on the same document ` if an no_match query was generated after going through the search analyser. 
   
   A similar issue was found in Lucene a few years back and was fixed by [this PR](https://github.com/apache/lucene/pull/11760) 
   
   I am proposing to make `NO_INTERVALS` present in Lucene as `public` so it can be used by it's clients like OpenSearch rather than creating a clone of the same. 


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "expani (via GitHub)" <gi...@apache.org>.
expani commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2120275366

   Added @romseygeek 


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "expani (via GitHub)" <gi...@apache.org>.
expani commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2119945093

   @romseygeek Should I add only under `Lucene 10.0.0` or other versions as well ? 


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2120476676

   Should I open a new issue, or should we revert this one and give a better solution?


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "romseygeek (via GitHub)" <gi...@apache.org>.
romseygeek merged PR #13385:
URL: https://github.com/apache/lucene/pull/13385


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "expani (via GitHub)" <gi...@apache.org>.
expani commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2120241068

   @jainankitk @romseygeek Requesting an approval. 


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2120480997

   OK. Just for brevity: How does the one made public here differs from the already existing class (except that one returns null iterator while the other one returns an empty iterator)?


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "romseygeek (via GitHub)" <gi...@apache.org>.
romseygeek commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2119987080

   We can backport this to 9x so add the entry under the latest 9x version.


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "romseygeek (via GitHub)" <gi...@apache.org>.
romseygeek commented on code in PR #13385:
URL: https://github.com/apache/lucene/pull/13385#discussion_r1606623194


##########
lucene/CHANGES.txt:
##########
@@ -362,6 +362,8 @@ Other
 
 * GITHUB#13077: Add public getter for SynonymQuery#field (Andrey Bozhko)
 
+* GITHUB#13385: Make NO_INTERVALS source as public to be used by Lucene clients instead of creating clones themselves.

Review Comment:
   Do you want to add your name here, so that we can assign credit?  Github account name is fine if that's your preference.



-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "romseygeek (via GitHub)" <gi...@apache.org>.
romseygeek commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2120502172

   From a quick look we can indeed replace everything with NoMatchIntervalIterator.  I think there are some other places that we can make use of the `null` shortcut as well - for example, DisjunctionIntervalsSource.create() can return `null` if its input collection is empty.


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2120514592

   This problem is often seen with patent search. I opened https://github.com/apache/lucene/issues/13388
   
   There are more issues, but making that constant publicly available is wrong. There should be a method to create an empty interval with a reason.


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2120497218

   See #13388


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "romseygeek (via GitHub)" <gi...@apache.org>.
romseygeek commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2120479350

   Let's open a new issue and we can discuss a bit more about when you need such a thing and where it should live.


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "expani (via GitHub)" <gi...@apache.org>.
expani commented on code in PR #13385:
URL: https://github.com/apache/lucene/pull/13385#discussion_r1606657816


##########
lucene/CHANGES.txt:
##########
@@ -362,6 +362,8 @@ Other
 
 * GITHUB#13077: Add public getter for SynonymQuery#field (Andrey Bozhko)
 
+* GITHUB#13385: Make NO_INTERVALS source as public to be used by Lucene clients instead of creating clones themselves.

Review Comment:
   Added
   



-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "jainankitk (via GitHub)" <gi...@apache.org>.
jainankitk commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2119856228

   Makes sense for IntervalBuilder clients to use the existing IntervalsSource implementation. Also, safe to make public given the variable is static final. Approved!


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Making NO_INTERVALS to be used by clients of Lucene [lucene]

Posted by "romseygeek (via GitHub)" <gi...@apache.org>.
romseygeek commented on PR #13385:
URL: https://github.com/apache/lucene/pull/13385#issuecomment-2119913543

   LGTM.  Can you add an entry to CHANGES.txt?


-- 
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: issues-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org