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

Lucene example source code file (SpanQuery.xml)

This example Lucene source code file (SpanQuery.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

exclude, include, spanfirst, spannear, spannear, spannot, spanor, spanor, spanorterms, spanorterms, spanterm, spanterm, tokens, utf-8

The Lucene SpanQuery.xml source code

<?xml version="1.0" encoding="UTF-8"?>
<SpanOr fieldName="contents">
	<SpanNear slop="8" inOrder="false" >		
				<!-- a less verbose way of declaring SpanTerm declarations - these are analyzed
					into a series of Tokens which are added as SpanTerm elements of a SpanOr
				<SpanOrTerms>miner miners
				<!-- finds mine near worker or workers -->
				<SpanNear slop="6" inOrder="false">		
					<SpanOrTerms>worker workers
	<SpanFirst end="10">
		<SpanOrTerms>fire burn
	<!-- Other Span examples....
				<SpanNear slop="2" inOrder="2">		

Other Lucene examples (source code examples)

Here is a short list of links related to this Lucene SpanQuery.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.