Record search allows a user to perform a keyword search against specific attribute values assigned to records.
The resulting records that have matching attribute values are returned, along with any valid refinement values.
Because record search returns a navigation page, it is important to remember that the record search parameter acts as a record filter in the same way that an attribute value does, even though it is not a specific value.
To configure run-time record search behavior, you must create one or more search interfaces, as described in Working with Search Interfaces.
There are no Dgraph configuration flags necessary to enable record searching. If an attribute was properly enabled for record searching, it will automatically be available for record searching.
You can use the Dgraph --search_max configuration flag to specify the maximum number of terms for text search. The default is 10.
For the list of supported languages for record search, see Supported languages.
<Operator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SearchOperator" Within="false"> <SearchFilter Mode="AllPartial" RelevanceRankingStrategy="numfields" Key="PROD_CATEGORY" EnableSnippeting="false" Language="en"> hardware </SearchFilter> </Operator>
This example uses en (American English) as the language for the record search query.
Rec ID | Attribute value (BikeType) | Name of attribute | Description of attribute |
---|---|---|---|
1 | Road Bikes (Value 2) | Road-450 | can do double-duty for racing or long-range mileage... |
2 | Road Bikes (Value 2) | Road-550-W | its speed comes at the sake of comfort... |
3 | Touring Bikes (Value 3) | Touring-1000 | combines comfort and performance... |
4 | Mountain Bikes (Value 1) | Mountain-500 | this mountain bike has serious racing performance... |