glawson0 commented on pull request #157: URL: https://github.com/apache/lucene/pull/157#issuecomment-865943363
Changed 3 parts of flatten graph filter 1) don't call freeBefore when we finish a hole src node. Hole src nodes can mean something hasn't been accounted for correctly so calling freeBefore may free nodes that still have info we need. 2) Change how RecoverFromHole picks the outSrc node. Instead of always always adding to the end of the OutputNodes list it scales down its position increment to match the output graph and uses that to pick the OutputNode. This doesn't require the distinction between neighbor and consumed holes. 3) Change the condition for fixing gaps after an alternate path hole. Now it checks if the shortest edge from the position the current edge is incrementing from comes to the current start node. if it doesn't then we've crossed a gap. Added a few more tests `testHeavilyConnectedGraphWithGap` and `testShingleFromGap` I believe cover the cases @mikemccand mentioned earlier. I also added the `Automaton` -> `TokenStream` -> Flattened`TokenStream` -> Automaton no paths lost test as well as a validation test on the existing random graph test. The validation gets weird with handling holes, but I think that's necessary as a hole in an accept sequence could be anything and hole sizes can change after flattening. -- 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