Using Questions to Perform a Full Text Search
If your KnowledgeKube application includes a data source with an Index, you can use a pair of special questions to surface the indexed data to end users. The first question accepts search text from the user, and the second provides a list of data that matches that text.
Implementation:
- Switch to the Definition panel.
- Click the question group you want to locate the questions.
- Click and select Full Text Search.
- In the Control Dependency pop up window select Go Ahead and Add the Associated Control radio button to add the Full Text Search and Full Text Search Results questions at the same time.
- Click OK.
- Edit the questions to give them both suitable keywords, change the Question Text of the Full Text Search question to whatever you want to appear on the button used to initiate a search.
- Link the questions, so the second one can receive results from the first - expand the results question using the plus symbol to the left of its keyword.
- Double-click the attribute named SearchTerm, from the list of automatically assigned attributes when the question was created.
- Click Edit Attribute.
- Switch to the Value panel.
- Type the keyword of the Full Text Search question into the field provided.
- Click OK to save the attribute.
- Access the Full Text Search question's Properties tab, and select the Further Question Options radio button.
- Tick the Add to Expression Parser check box, so the question's keyword can be used in KnowledgeKube's Expression parser, and the search question's value can be used to provide the value of the attribute assigned to the result question.
- Assign a data source to both questions. Make sure you specify the indexed data source you want to perform searches.
There are several other attributes assigned to the results question as standard, but these can be left with their default values unless you want to make changes to the appearance and behaviour of either question.
- Make sure the medium you want to test is up to date, so you can test the full-text search pairing.
- Open either the Insights tool or your model on the front end, and use the text box to type a search term. The question group containing the full-text questions will represent the input as a paired text box and button, and initially no results will be visible.
- Click the adjacent button to initiate a search. If the term appears as typed in your indexed data, all matching results will be displayed by the results question.
The value returned for each search result will be displayed as a clickable hyperlink, the URL of which is based on the Mask associated with the data source index.
Each results question is able to display a maximum number of results on-screen at once. If the total number of results is greater than the maximum allowed - 20 by default - the list will be divided into pages, which you can browse using the page numbers and Previous/Next buttons at the bottom of the search results.