Global.helma.Search.PhraseQuery (field, str)
Constructs a new PhraseQuery instance that wraps a lucene Phrase Query object.

  • Parameter {String}:
    field The name of the field
  • Parameter {String}:
    str The phrase query string
  • Returns
    A newly created PhraseQuery instance
Sourcecode in /home/hannes/helma/modules/helma/Search.js:
912:   helma.Search.PhraseQuery = function(field, str) {
913:       this.query = new Packages.org.apache.lucene.search.PhraseQuery();
914:   
915:       /**
916:        * add a term to the end of the phrase query
917:        */
918:       this.addTerm = function(field, str) {
919:           var t = new Packages.org.apache.lucene.index.Term(field, str);
920:           this.query.add(t);
921:          return;
922:      };
923:  
924:      if (field && str)
925:          this.addTerm(field, str);
926:      delete this.base;
927:      return this;
928:  }