sqshq commented on pull request #149:
URL: https://github.com/apache/lucene/pull/149#issuecomment-848952461


   Hi Greg,
   You are right, [`TaxonomyFacets` fail with 
`IllegalArgumentException`](https://github.com/sqshq/lucene/blob/7f8b7ffbcad2265b047a5e2195f76cc924028063/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacets.java#L121)
 in the case when we are trying to search for a field that has a different 
`indexFieldName`. Although here we are not even checking that the `dimension` 
is present for the configured `indexFieldName` - this error is only related to 
the field mismatch.
   
   That behavior actually looks more or less consistent with SSDVFF 
implementation. There, if we try to create a `SortedSetDocValuesReaderState` 
for a field that was never indexed with facets, [we fail with 
`IllegalArgumentException`](https://github.com/sqshq/lucene/blob/7f8b7ffbcad2265b047a5e2195f76cc924028063/lucene/facet/src/java/org/apache/lucene/facet/sortedset/DefaultSortedSetDocValuesReaderState.java#L73).
   
   Although those `IllegalArgumentExceptions` are thrown in slightly different 
situations, I think in both cases they are pointing to a field name 
misconfiguration (or a bug in the code), rather than "user requested unseen 
dimension" scenario. As far as I understand in most of the cases the facet 
field name is a single/constant set of values, so most likely we indeed want to 
make sure that user does not ignore it. Also, this behavior can't be easily 
changed for SSDVFF, since the field check happens in 
`SortedSetDocValuesReaderState` constructor - we can't return null there. 
   
   @gsmiller let me know what do you think!


-- 
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.

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