stefanvodita commented on PR #11780:
URL: https://github.com/apache/lucene/pull/11780#issuecomment-1464991650

   Thanks for the feedback @gmiller! The way you describe the 
state-of-the-world makes perfect sense to me, I think we’re on the same page 
there.
   
   What I was trying to do with `SsdvReaderStatesManager` is similar to what 
you suggest. I definitely made that harder to get across by not removing code 
from old revisions, but I’ve fixed that now.
   
   Highlights from the new revision:
   1. In `FacetsConfig` I’ve made it so that we store and are able to recall 
which fields are used for faceting.
   2. `SsdvReaderStatesManager` stores and retrieves reader states. You 
mentioned doing this in `FacetsConfig`, but it felt like that added a lot of 
new responsibility to the class, so I decided to keep it separate. Let me know 
if you still think it should go into `FacetsConfig`.
   
   > we could consider a different ctor for SSDVFacets that takes a 
FacetsConfig instance
   
   I didn’t do this part because AFAICT to make a call to a Facets 
implementation, the user needs to select a field. Right now, they do this by 
encapsulating the field in the reader state. If the user passed a 
`SsdvReaderStatesManager` instead of a reader state, they would also need to 
pass the field name. It seems easier to just pass the reader state.
   
   > a single FacetsConfig instance could be used with different index readers 
while a refresh is happening
   
   Interesting! I’ve accounted for this in `SsdvReaderStatesManager`, but 
haven’t yet implemented a “forgetting” mechanism for old `IndexReader`s. I 
think we can have at most 2 active `IndexReader`s, right? If so, we set 
something up along the lnes of `LiveFieldValues`, with an “old” map and a 
“current” map.


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