Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

{ "query":{"interval":{"json_param":"int_q"}},
"params":{"int_q":"foo bar"}
}

IntervalSource Object

parsing JSON query. Notice abbreviations used below: IS, I.x

{ "query":{"interval":{"json_param":"int_q"}},
"params":{"int_q":{ // this is IntervalSource object, referred as IS object below

// these props are exclusive, only one of them is allowed
"phrase": "token stream goes to I.phrase()", // or ["any other", "string. token streams are concatenated (flattern) and go to I.phrase()", {/* or separate IS objs as elems*/}]
"prefix": "passes *multiterm* field analysis, strictly expecting single token stream, turns to I.prefix()"
"term": "passes field analysis, strictly expecting single token stream, turns to I.term()", // should it support single elem array? ["foo"]
"raw": "bypass analysis, turns to I.term()",
"or":[ "token stream handled as one phrase, single token as {term}" , { /* IS object goes here*/ } ],
"ordered": "like _phrase_, but turns to I.ordered() ", // or list ["but, no phrase flatterning happens "]
"unordered": "like _phrase_, but turns to I.unordered() ", // or list ["but, no phrase flatterning happens "]

// these might attribute others, but not all of them
"gaps":2, // Optional. wraps underneath IS with I.maxgaps(), presumably, shouldn't be combined with _phrase_
"width":2, // Optional. wraps underneath IS with I.maxwidth(), I'm not sure how it's combined with gaps above
"field":"title",// Optional. wraps underneath IS with I.fixField(),
"max_expansions":123 // "only for _prefix_"
}
}
}

Limitations

  • ignores PositionIncrement Attribute so far. 

Sample 

{   "query":{"interval":{"json_param":"int_q"}},
"params":{"int_q": {
"ordered": ["Apache", "Software", {"prefix":"Found"}],
"gaps":5
}
}
}

.