Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3041

Support Query Visting / Walking

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0-ALPHA
    • 8.1
    • core/search
    • None
    • New, Patch Available

    Description

      Out of the discussion in LUCENE-2868, it could be useful to add a generic Query Visitor / Walker that could be used for more advanced rewriting, optimizations or anything that requires state to be stored as each Query is visited.

      We could keep the interface very simple:

      public interface QueryVisitor {
        Query visit(Query query);
      }
      

      and then use a reflection based visitor like Earwin suggested, which would allow implementators to provide visit methods for just Querys that they are interested in.

      Attachments

        1. LUCENE-3041.patch
          66 kB
          Alan Woodward
        2. LUCENE-3041.patch
          15 kB
          Chris Male
        3. LUCENE-3041.patch
          48 kB
          Chris Male
        4. LUCENE-3041.patch
          51 kB
          Chris Male
        5. LUCENE-3041.patch
          14 kB
          Chris Male
        6. LUCENE-3041.patch
          14 kB
          Chris Male
        7. LUCENE-3041-8x.patch
          234 kB
          Alan Woodward

        Issue Links

          Activity

            People

              romseygeek Alan Woodward
              cmale Chris Male
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 26h
                  26h