romseygeek commented on issue #11864:
URL: https://github.com/apache/lucene/issues/11864#issuecomment-1287840855

   I think this is a bug in the SolrQueryParserBase, rather than in Lucene?  
The callsites within lucene's QueryBuilder all check that they only call 
`newSynonymQuery` with a non-empty list.  You can report the bug at 
https://github.com/apache/solr
   
   Having said that, this is a trappy API.  I wonder if we should change the 
signature of `newSynonymQuery` to take a field and a list of BytesRef (or 
rather BytesRefAndBoost, given that we allow settings boosts on individual 
terms now), and also update `SynonymQuery.Builder#addTerm` to take a BytesRef 
rather than a Term.  Currently we're adding the same field over and over again 
which adds a bunch of unnecessary ceremony to building the query.


-- 
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-unsubscr...@lucene.apache.org

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


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

Reply via email to