Query parsed to: spanqueri
1 - 11 of 11 results (Page 1 of 1)

1.6.3 : Query

starts on page 23 under section 1.6 (Understanding the core searching classes) in chapter 1 (Meet Lucene)

...Lucene comes with a number of concrete Query subclasses. So far in this chapter we've mentioned only the most basic Lucene Query: TermQuery. Other Query types are BooleanQuery, PhraseQuery, PrefixQuery, PhrasePrefixQuery, RangeQuery, FilteredQuery, and SpanQuery. All of these are covered in chapter 3. Query is the common, abstract parent class. It contains several utility methods, the most interesting of which is setBoost(float), described in section 3.5.9.... [Full sample chapter]

5.4.5 : Spanning the globe

starts on page 169 under section 5.4 (Span queries: Lucene's new hidden gem) in chapter 5 (Advanced search techniques)

...Finally there is SpanOrQuery, which aggregates an array of SpanQuerys. Our exam- ple query ... lengthier due to all the sub-SpanQuerys being built upon (see listing 5.5). Using dumpSpans, we analyze ... { SpanNearQuery quick_fox = new SpanNearQuery(new SpanQuery[]{quick, fox}, 1, true); SpanNearQuery lazy_dog = new SpanNearQuery(new SpanQuery[]{lazy, dog}, 0, true); SpanNearQuery sleepy_cat = new SpanNearQuery(new SpanQuery[]{sleepy, cat}, 0, true); SpanNearQuery qf_near_ld = new SpanNearQuery( new...

5.4.6 : SpanQuery and QueryParser

starts on page 170 under section 5.4 (Span queries: Lucene's new hidden gem) in chapter 5 (Advanced search techniques)

...QueryParser doesn't currently support any of the SpanQuery types. Perhaps, though, support will eventually be added. At least one member of the Lucene community has created a query expression parser designed for span query expressions that may be part of the Lucene Sandbox by the time you read this. See the resources listed in appendix C for more details on how to tap into the Lucene user community. Recall from section 3.4.5 that PhraseQuery is impartial to term order when enough slop...

5.4.2 : Finding spans at the beginning of a field

starts on page 165 under section 5.4 (Span queries: Lucene's new hidden gem) in chapter 5 (Advanced search techniques)

..., but 3 is just long enough to cause a match in the second query (see figure 5.2). Any SpanQuery can be used ... n (2 and 3 in this case) positions. The resulting span matches are the same as the original SpanQuery spans...

5.4.1 : Building block of spanning, SpanTermQuery

starts on page 163 under section 5.4 (Span queries: Lucene's new hidden gem) in chapter 5 (Advanced search techniques)

..., a SpanQuery keeps track of its matches: a series of start/end positions for Figure 5.1 SpanTermQuery ... . The dumpSpans method uses some lower-level SpanQuery API to navigate the spans; this lower-level ... further on it. Each SpanQuery subclass sports a useful toString() for diagnostic purposes, which dumpSpans uses: private void dumpSpans(SpanQuery query) throws IOException { Spans spans = query ... SpanQuery types....

5.4.3 : Spans near one another

starts on page 166 under section 5.4 (Span queries: Lucene's new hidden gem) in chapter 5 (Advanced search techniques)

... SpanTermQuery objects is shown in figure 5.3. Using SpanTermQuery objects as the SpanQuerys ... testSpanNearQuery() throws Exception { SpanQuery[] quick_brown_dog = new SpanQuery[]{quick, brown, dog ... = new SpanNearQuery(new SpanQuery[]{lazy, fox}, 3, false); e assertOnlyBrownFox(snq); Nested ... SpanTermQuerys, but SpanNearQuery allows for any SpanQuery type. A more sophisticated SpanNearQuery...

5.4 : Span queries: Lucene's new hidden gem

starts on page 161 in chapter 5 (Advanced search techniques)

...Lucene 1.4 includes a new family of queries, all based on SpanQuery. A span in this context ... , in conjunction with the new SpanQuery subclasses, allow for even more query discrimination ... that match. There are five subclasses of the base SpanQuery, shown in table 5.1. Table 5.1 SpanQuery family SpanQuery type Description SpanTermQuery Used in conjunction with the other span query types ... . We'll discuss each of these SpanQuery types within the context of a JUnit test case, SpanQueryTest...

5.4.4 : Excluding span overlap from matches

starts on page 168 under section 5.4 (Span queries: Lucene's new hidden gem) in chapter 5 (Advanced search techniques)

...The SpanNotQuery excludes matches where one SpanQuery overlaps another. The following code demonstrates: public void testSpanNotQuery() throws Exception { SpanNearQuery quick_fox = new SpanNearQuery(new SpanQuery[]{quick, fox}, 1, true); assertBothFoxes(quick_fox); dumpSpans(quick_fox); SpanNotQuery quick_fox_dog = new SpanNotQuery(quick_fox, dog); assertBothFoxes(quick_fox_dog); dumpSpans(quick ... : SpanNearQuery quick_fox = new SpanNearQuery(new SpanQuery[]{quick, fox}, 1, true); spanNear([f:quick...

5.8 : Summary

starts on page 193 in chapter 5 (Advanced search techniques)

...This chapter has covered some diverse ground, highlighting Lucene's additional built-in search features. Sorting is a dramatic new enhancement that gives you control over the ordering of search results. The new SpanQuery family leverages term-position information for greater searching precision. Filters constrain doc- ument search space, regardless of the query. Lucene includes support for multiple (including parallel) and remote index searching, giving developers a head start on distributed...

index

starts on page 416

... 383 position, increment offset in Moffat, Alistair 26 through Hits 77 SpanQuery 161 morphological variation ... 341 and SpanQuery 170 recall 11, 360 Short, Allen 320 boosting queries 99 regular expressions. similar term ... 162, 168 definition 103 troubleshooting 392 SpanOrQuery 162, 169 navigation with Luke 273 SpanQuery 161-170 t...

about this book

starts on page xxv

... query types make their appearance, including the spectacular SpanQuery family. Finally, we cover Lucene...