solr icon indicating copy to clipboard operation
solr copied to clipboard

SOLR-15546: ShortestPathStream to handle ids with colons.

Open cpoerschke opened this issue 4 years ago • 8 comments

https://issues.apache.org/jira/browse/SOLR-15546

cpoerschke avatar Jul 26 '21 18:07 cpoerschke

I didn’t even consider the “quoted” case, I was thinking of text with a quote character in the middle. But I’m glad that we are thinking about that one too!

madrob avatar Jul 29 '21 17:07 madrob

... text with a quote character in the middle. ...

I would speculate that somehow encoding the id might be one approach? The text could contain quotes in the middle or apostrophe or colon or space or other stuff too.

cpoerschke avatar Jul 29 '21 17:07 cpoerschke

Hmm, have tried but not yet found a way to support quotes in the middle.

And if there is a space in the text then the code adding surrounding quotes changes the results, so with that behaviour change in mind perhaps any fix would be for 9x only and then no need to consider the scenario of the caller having added surrounding quotes since backwards compatibility is not retained anyhow?

Either way, I've amended the test coverage to include space and single and double quotes.

cpoerschke avatar Jul 30 '21 18:07 cpoerschke

perhaps any fix would be for 9x only and then no need to consider the scenario of the caller having added surrounding quotes since backwards compatibility is not retained anyhow

I think we still want to back port a fix for colons at least to 8x? Maybe there are parts that stay 9x only, but I think this is probably something important to have in our release line

madrob avatar Aug 26 '21 16:08 madrob

perhaps any fix would be for 9x only and then no need to consider the scenario of the caller having added surrounding quotes since backwards compatibility is not retained anyhow

I think we still want to back port a fix for colons at least to 8x? Maybe there are parts that stay 9x only, but I think this is probably something important to have in our release line

One way for a backwards compatible or "backwards compatible friendly" change for the 8x release line could be via an optional flag:

shortestPath(
  collection,
  from="[email protected]",
  to="[email protected]",
  ...
)

or

shortestPath(
  collection,
  from="[email protected]",
  to="[email protected]",
  ...
  solr15546fix=true
)

for fixed behaviour with the option of

shortestPath(
  collection,
  from="[email protected]",
  to="[email protected]",
  ...
  solr15546fix=false
)

for backwards compatible behaviour. So solr15546fix as an opt-out, solr15546fix would have to be some other name of course, and depending on name and whether or not it would be in 9.x also it could also be opt-in rather than opt-out though for this type of fix opt-out seems best.

cpoerschke avatar Aug 26 '21 17:08 cpoerschke

This PR had no visible activity in the past 60 days, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the [email protected] mailing list. Thank you for your contribution!

github-actions[bot] avatar Feb 25 '24 00:02 github-actions[bot]