home | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Lucene example source code file (TermsQuery.xml)

This example Lucene source code file (TermsQuery.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Lucene tags/keywords

and, booleanquery, for, for, lucene, not, of, termqueries, termqueries, termsquery, termsquery, this, utf-8, utf-8

The Lucene TermsQuery.xml source code

<?xml version="1.0" encoding="UTF-8"?>
		<!-- TermsQuery uses an analyzer to tokenize text and creates a BooleanQuery with nested
			"should" TermQueries for each of the tokens encountered. This can be used for user input
			which may include content or characters that would otherwise be illegal query syntax when
			using the standard lucene query parser. Of course the downside is that none of the query 
			operators (AND NOT ~ ^ : etc) will have an effect. For some scenarios queries are
			not formed by people familiar with Lucene query syntax and they can inadvertently type illegal
			query syntax so in these cases this is an appropriate and simple alternative
		--> 
<TermsQuery fieldName="contents">sumitomo bank

Other Lucene examples (source code examples)

Here is a short list of links related to this Lucene TermsQuery.xml source code file:



my book on functional programming

 

new blog posts

 

Copyright 1998-2019 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.