Query Syntaxes
Query processing time depends on the syntax that the query uses. Different syntaxes are available, and some require you to create fields in a specific way.
Fastest
Syntax: | action=Query&Text=text&FieldText=EQUAL{numericalAttribute}:fieldName
|
Requirements: |
|
Example: |
Four attributes are available to indicate which categories a document belongs to: England, France, Germany, USA It uses numbers to indicate which attributes apply to a document: 1—England, 2—France, 3—Germany, 4—USA In documents, you create a numeric field for each category that they belong to. For example, if a document belongs to the categories France and USA: #DREFIELD Cat1="2" #DREFIELD Cat2="4" The following query returns documents that match the specified action=Query&Text=presidential election&FieldText=EQUAL{4}:Cat* |
Syntax: | action=Query&Text=text&FieldText=MATCH{attribute}:fieldName
|
Requirements: |
|
Example: |
Four attributes are available to indicate which categories a document belongs to: England, France, Germany, USA In documents, you create a field for each category that they belong to. For example, if a document belongs to the categories France and USA: #DREFIELD Cat1="France" #DREFIELD Cat2="USA" The following query returns documents that match the specified action=Query&Text=presidential election&FieldText=MATCH{France}:Cat* |
Syntax: | action=Query&Text=text&FieldText=BITAND{numericalAttribute}:fieldName
|
Requirements: |
|
Example: |
Four attributes are available to indicate which categories a document belongs to: England, France, Germany, USA Assign a bit value to each attribute: 1—France, 2—England, 4—Germany, 8—USA In documents, you create a field for the categories that they belong to. For example, if a document belongs to the categories France and USA: #DREFIELD Cat="9" The following query returns documents that match the specified action=Query&Text=presidential election&FieldText=BITAND{10}:Cat |
Slowest
Syntax: | action=Query&Text=text&FieldText=STRING{attribute}:fieldName
|
Requirements: |
|
Example: |
Four attributes are available to indicate which categories a document belongs to: England, France, Germany, USA In documents, you create a field that contains a comma-separated list of the categories that the documents belong to. For example, if a document belongs to the categories France and USA: #DREFIELD Cat="France,USA" The following query returns documents that match the specified action=Query&Text=presidential election&FieldText=STRING{France}:Cat |