@Test public void shouldParseStringWithMultipleQuotedAndUnquotedTermsWithNegatedTerms() { Term result = parser.parse("term1 \"term2 and 2a\" -term3 -'term 4'"); assertThat(result, is(notNullValue())); assertThat(result, is(instanceOf(Conjunction.class))); Conjunction conjunction = (Conjunction)result; assertHasSimpleTerms(conjunction, "term1", "term2 and 2a", "-term3", "-term 4"); }
public Term parse( String fullTextSearchExpression ) { CheckArg.isNotNull(fullTextSearchExpression, "fullTextSearchExpression"); Tokenizer tokenizer = new TermTokenizer(); TokenStream stream = new TokenStream(fullTextSearchExpression, tokenizer, false); return parse(stream.start()); }
FullTextSearchParser implements QueryParser { public Term parse( String fullTextSearchExpression ) { CheckArg.isNotNull(fullTextSearchExpression, "fullTextSearchExpression"); Tokenizer tokenizer = new TermTokenizer(); TokenStream stream = new TokenStream(fullTextSearchExpression, tokenizer, false); return parse(stream.start()); } }
FullTextSearchParser implements QueryParser { public Term parse( String fullTextSearchExpression ) { CheckArg.isNotNull(fullTextSearchExpression, "fullTextSearchExpression"); Tokenizer tokenizer = new TermTokenizer(); TokenStream stream = new TokenStream(fullTextSearchExpression, tokenizer, false); return parse(stream.start()); }  }
FullTextSearchParser implements QueryParser { public Term parse( String fullTextSearchExpression ) { CheckArg.isNotNull(fullTextSearchExpression, "fullTextSearchExpression"); Tokenizer tokenizer = new TermTokenizer(); TokenStream stream = new TokenStream(fullTextSearchExpression, tokenizer, false); return parse(stream.start()); }  @Override String getLanguage(); @Override QueryCommand parseQuery( String query,
                                    TypeSystem typeSystem ); Term parse( String fullTextSearchExpression ); Term parse( TokenStream tokens ); }
FullTextSearchParser implements QueryParser { public Term parse( String fullTextSearchExpression ) { CheckArg.isNotNull(fullTextSearchExpression, "fullTextSearchExpression"); Tokenizer tokenizer = new TermTokenizer(); TokenStream stream = new TokenStream(fullTextSearchExpression, tokenizer, false); return parse(stream.start()); }  @Override String getLanguage(); @Override QueryCommand parseQuery( String query,
                                    TypeSystem typeSystem ); Term parse( String fullTextSearchExpression ); Term parse( TokenStream tokens ); static final String LANGUAGE; }