Lucene - Core
  1. Lucene - Core
  2. LUCENE-682

QueryParser with Locale Based Operators (French included)

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/queryparser
    • Labels:
      None
    • Lucene Fields:
      Patch Available

      Description

      Here is a version of the QueryParser that can "understand" the AND, OR and NOT keyword in other languages.

      If activated,

      • "a ET b" should return the same query as "a AND b", namely: "+a +b"
      • "a OU b" should return the same query as "a OR b", namely: "a b"
      • "a SAUF b" should return the same query as "a NOT b", namely: "a -b"

      Here are its main points :

      1) Patched from revision 454774 of lucene 2.1dev (trunk) (probably could be used with other versions)
      2) The "ant test" target is still successful when the modified QueryParser is used
      3) It doesn't break actual code
      4) The default behavior is the same as before
      5) It has to be deliberately activated
      6) It use ResourceBundle to find the keywords translation
      7) Comes with FRENCH translation
      8) Comes with JUnit testCases
      9) Adds 1 public method to QueryParser
      10) Expands the TOKEN <TERM>
      11) Use TOKEN_MGR_DECLS to set some field for the TokenManager

      1. QueryParser.jj.patch
        4 kB
        Patrick Turcotte
      2. QueryParser.properties
        0.0 kB
        Patrick Turcotte
      3. LocalizedQueryParserDemo.java
        0.6 kB
        Patrick Turcotte
      4. QueryParser_fr.properties
        0.0 kB
        Patrick Turcotte
      5. TestQueryParserLocaleOperators.java
        3 kB
        Patrick Turcotte
      6. QueryParser.jj
        30 kB
        Patrick Turcotte
      7. LocalizedQueryParser.zip
        12 kB
        Patrick Turcotte
      8. LocalizedQueryParser.patch
        19 kB
        Hoss Man
      9. LocalizedQueryParser.patch
        21 kB
        Hoss Man
      10. LocalizedQueryParserOperatorsMicroBench.java
        3 kB
        Hoss Man

        Activity

          People

          • Assignee:
            Hoss Man
            Reporter:
            Patrick Turcotte
          • Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development