XQuery/Overview of eXist search functions and operators

From Wikibooks, open books for an open world
Jump to: navigation, search

Overview of eXist search funtions and operators

In catching up with updating from eXist-1.2.6 to eXist-1.4.x, one thing struck me. Despite eXist's elaborate documentation, I was feeling a bit lost in the myriad of overlapping search functions and their modalities (both default and fallback behaviours). I think I would feel helped with an overview grouping the different search-related functions in one place.

I don't know if this could be interesting to complete the eXist documentation; at this stage, however I'm not too sure about all functions, and maybe others may see more interesting approaches for such an overview. Therefore, I thought maybe the Wikibook could be an interesting place for such information.

The table below provides an overview, with following colour codes:
I'm not 100% sure -- all clarifications welcome!
not in eXist function documentation

overview of eXist search funtions and operators
query type index use
function / operator wildcards regex brute force fallback range legacy FT lucene FT ngram
fn:matches() x x x
fn:contains(), fn:starts-with(), fn:ends-with() x x
=, <, <=, >, >= x x
text:match-any(), text:match-all() x x
text:fuzzy-match-all(), text:fuzzy-match-any() x
text:matches-regex() x x x
near(), &=, |= x x
ft:query() x x x
ngram:contains(), ngram:starts-with(), ngram:ends-with() x