Hi,
 
I have an index with a field 'content' (tokenized, stored, indexed)
using Lucene 1.9.1.
I tried to search this text in exact string: "european parliament
resolution on the Commission report on the regional meetings arranged by
the Commission in 1998-1999 on the common fisheries policy after 2002"
I use this part of code to parse the query:
public void addQuery(String field, String value, Occur occ) {
        QueryParser queryparser = new QueryParser(field, new
SimpleAnalyzer());
        Query query = null;
        try {
            if (value.charAt(0) == '"' && value.charAt((value.length() -
1)) == '"') {
                value = QueryParser.escape(value.substring(1,
(value.length() - 1)));
                value = '"' + value + '"';
            } else {
                value = QueryParser.escape(value);
            }
            // PhraseQuery phraseQuery = new PhraseQuery();
            // phraseQuery.add(new Term(field, value));
            query = queryparser.parse(value);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        combinedQueries.add(query, occ);
 
When I print the Query I retrived this string: 

+doccontent:"european parliament resolution on the commission report on
the regional meetings arranged by the commission in on the common
fisheries policy after"

Why 1998-1999  have been removed by the parser?

Reply via email to