Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
admin:indexing:text:results [2012/01/31 22:03]
doc
admin:indexing:text:results [2016/06/28 22:38] (current)
Line 10: Line 10:
 [[admin:​indexing:​text:​retrieve|External Files]] |  [[admin:​indexing:​text:​retrieve|External Files]] | 
 [[admin:​indexing:​text:​proximity|Proximity Searches]] |  [[admin:​indexing:​text:​proximity|Proximity Searches]] | 
 +[[admin:​indexing:​text:​advanced|Advanced Searches]] | 
 **[[admin:​indexing:​text:​results|Displaying Results]]** |  **[[admin:​indexing:​text:​results|Displaying Results]]** | 
 [[admin:​indexing:​text:​relevancy|Relevancy]] [[admin:​indexing:​text:​relevancy|Relevancy]]
Line 21: Line 22:
 Omnidex allows excerpts to be retrieved from large blocks of text to make viewing easier. ​ These excerpts show the portions of the text that qualified the row, with the search terms highlighted.  ​ Omnidex allows excerpts to be retrieved from large blocks of text to make viewing easier. ​ These excerpts show the portions of the text that qualified the row, with the search terms highlighted.  ​
  
-Excerpts are retrieved using the $CONTEXT function. ​ The $CONTEXT function works hand-in-hand with the $CONTAINS function. ​ The $CONTAINS function is used to label a particular ​proximity ​search, and the $CONTEXT function retrieves excerpts for that same label. ​ This is needed before there may be other criteria in the SQL statement, and even multiple Proximity Searches against multiple columns and tables. ​ Only one Proximity Search can feed these excerpts, necessitating the pairing of the $CONTAINS function and the $CONTEXT function. +Excerpts are retrieved using the $CONTEXT function. ​ The $CONTEXT function works hand-in-hand with the $CONTAINS function. ​ The $CONTAINS function is used to label a particular search, and the $CONTEXT function retrieves excerpts for that same label. ​ This is needed before there may be other criteria in the SQL statement, and even multiple Proximity Searches against multiple columns and tables. ​ Only one Proximity Search can feed these excerpts, necessitating the pairing of the $CONTAINS function and the $CONTEXT function.
- +
-=== $CONTAINS Function === +
- +
-The [[dev:​sql:​functions:​contains|$CONTAINS]] function allows a specific WHERE clause predicate to be labelled, and also allows options that control the search. ​ In its simplest form, the following two statements are identical:​ +
- +
-<​code>​ +
-> select title from books where title = '​Hamlet';​ +
- +
-TITLE +
------------------------------------------------------------------------------ +
-Hamlet +
-1 row returned +
-+
-> select title from books where $contains(title,​ '​Hamlet'​);​ +
- +
-TITLE +
------------------------------------------------------------------------------ +
-Hamlet +
-1 rows returned +
-+
-</​code>​ +
- +
-The $CONTAINS function also allows options that manually engage the PowerSearch features, such as misspellings,​ synonyms, etc.   +
- +
-<​code>​ +
-> select title from books where $contains(content,​ '​missisipi','​misspellings'​);​ +
- +
-TITLE +
------------------------------------------------------------------------------ +
-Around the World in Eighty Days +
-The Adventures of Tom Sawyer +
-2 rows returned +
-</​code>​ +
- +
-The $CONTAINS function allows criteria to be labelled for eventual pairing with excerpts using the $CONTEXT function or relevancy scoring using the $SCORE function: +
- +
-<​code>​ +
-> select ​       TITLE +
->> ​ from        BOOKS +
->> ​ where       ​$contains(LANGUAGE,​ '​English',,​ '​LANGUAGE'​) and +
->> ​             $contains(CONTENT,​ '​missisipi',​ '​misspellings',​ '​CONTENT'​);​ +
- +
-TITLE +
------------------------------------------------------------------------------ +
-Around the World in Eighty Days +
-The Adventures of Tom Sawyer +
-2 rows returned +
-</​code>​+
  
 === $CONTEXT Function === === $CONTEXT Function ===
Line 119: Line 72:
  
 <​code>​ <​code>​
-select ​       TITLE, +select ​       TITLE, 
-              $CONTEXT(255,​ '​STYLE=TEXT',​ '​CONTENT'​) +>> ​             ​$CONTEXT(255,​ '​STYLE=TEXT',​ '​CONTENT'​) 
-  from        BOOKS +>> ​ ​from ​       BOOKS 
-  where       ​$contains(LANGUAGE,​ '​English',,​ '​LANGUAGE'​) and +>> ​ ​where ​      ​$contains(LANGUAGE,​ '​English',,​ '​LANGUAGE'​) and 
-              $contains(CONTENT,​ '​missisipi',​ '​misspellings',​ '​CONTENT'​);​+>> ​             ​$contains(CONTENT,​ '​missisipi',​ '​misspellings',​ '​CONTENT'​);​
  
 TITLE TITLE
Line 140: Line 93:
 =====  ===== =====  =====
  
-**[[admin:​indexing:​text:​proximity|Prev]]** |+**[[admin:​indexing:​text:​advanced|Prev]]** |
 **[[admin:​indexing:​text:​relevancy|Next]]** **[[admin:​indexing:​text:​relevancy|Next]]**
  
 
Back to top
admin/indexing/text/results.1328047419.txt.gz · Last modified: 2016/06/28 22:38 (external edit)