Changeset 4213


Ignore:
Timestamp:
2003-05-01T12:03:42+12:00 (21 years ago)
Author:
kjdon
Message:

added a syntax error boolean to teh queryresult - indicates that there was a parsing error on teh query string

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/indexers/mgpp/java/org/greenstone/mgpp/MGPPQueryResult.java

    r3365 r4213  
    1717    /** the total number of docs found - not likely to be the size of docs_*/
    1818    protected long total_num_docs_=0;
     19    /** whether a syntax error has occurred */
     20    protected boolean syntax_error_ = false;
    1921   
    2022    MGPPQueryResult() {
     
    2729    docs_.clear();
    2830    terms_.clear();
     31    syntax_error_ = false;
    2932    }
    3033    /** returns the result as a String - useful for printing out results */
    3134    public String toString() {
     35   
    3236    String result = "";
    3337    result += "docs (ranks): ";
     
    9397    return total_num_docs_;
    9498    }
    95        
     99     
     100    public void setSyntaxError(boolean error) {
     101    syntax_error_ = error;
     102    }
     103
     104    public boolean hasSyntaxError() {
     105    return syntax_error_;
     106    }
    96107}
    97108
  • trunk/mgpp/java/org/greenstone/mgpp/MGPPQueryResult.java

    r3365 r4213  
    1717    /** the total number of docs found - not likely to be the size of docs_*/
    1818    protected long total_num_docs_=0;
     19    /** whether a syntax error has occurred */
     20    protected boolean syntax_error_ = false;
    1921   
    2022    MGPPQueryResult() {
     
    2729    docs_.clear();
    2830    terms_.clear();
     31    syntax_error_ = false;
    2932    }
    3033    /** returns the result as a String - useful for printing out results */
    3134    public String toString() {
     35   
    3236    String result = "";
    3337    result += "docs (ranks): ";
     
    9397    return total_num_docs_;
    9498    }
    95        
     99     
     100    public void setSyntaxError(boolean error) {
     101    syntax_error_ = error;
     102    }
     103
     104    public boolean hasSyntaxError() {
     105    return syntax_error_;
     106    }
    96107}
    97108
Note: See TracChangeset for help on using the changeset viewer.