Query attributes

From OpenSearchServer Wiki
Jump to: navigation, search

This section will cover the various parameters in the order used in the web interface:

Query Parameters.png


Contents

Query sub-tab

This is where the basic parameters are determined.

Pattern Query

OSS is provided with a basic pattern query. If it doesn't appear right away, load the "Search" template (juste above the "Query" subtab).

title:($$)^10 OR title:("$$")^10
			OR
			titleExact:($$)^10 OR titleExact:("$$")^10
			OR url:($$)^5 OR
			url:("$$")^5
			OR urlSplit:($$)^5 OR urlSplit:("$$")^5
			OR
			urlExact:($$)^5
			OR urlExact:("$$")^5
			OR content:($$) OR
			content:("$$")
			OR
			contentExact:($$) OR contentExact:("$$")

As you can probably tell from the code:

  • this is a wide-ranging query rotating (via the OR operator) through a number of fields.
  • the fields are parsed both for sentence ("$$") OR the raw terms ($$). What we mean by "sentence" depends on the phrase slop parameter, as explained below
  • the scoring weight given to each of those field is plainly expressed - in this case something found in the title has a weight of 10, in the URL a weight of 5, and in the content in default weight of 1.


Remember, in the tab "Schema" and the sub-tab "Fields" you can check the characteristics of each of those standard OSS fields - for instance to see the difference between "content" and "contentExact", which are two fields being queried by the standard query. The possible attributes for a field are documented in Field attributes.


You can learn more about the query syntax via our Syntax of the OSS queries page.


Enter the query

Just type in what you need to find.


Default operator

By default this is set to the basic Boolean AND. Thus, if you query "Open Search Server", the query will be understood as Open AND Search AND Server by the search engine.

The default operator can be set to OR for more specific needs.


Start offset

The position where the search will start - by default at the beginning ("0"). Higher offsets are usually used for pagination purposes, to start where the previous page ended -- or to narrow down the search space.


Number of rows

Maximum number of rows the query is allowed to return.


Phrase slop

When searching for a sentence, the phrase slop is the tolerance for words between the terms being searched. For instance:

  • ("champions world") with a slop of 1 would accept "world champions", but not "champions of the world", as a valid target
  • ("champions world") with a slop of 2 would accept "world champions" and "world-wide champions" but not "champions of the world" as a valid target
  • a slop of 3 would be wide enough for "champions of the world" to be an acceptable target for ("champions world")


Language

Indicates which language analyser should be used for stem analysis - e.g., to determine that "coming" and "come" are semantically very close in the English language, an can be computed as such when running a search.

This stemming analysis is done on the terms being queried, to determine the terms that are semantically close to the terms you are looking for, in the language you just chose.


So far, so good ? To know more about the possible parameters for queries, go back to the Main Page and check the subsections.

Personal tools
Get OSS Open Search Server at SourceForge.net. Fast, secure and Free Open Source software downloads