186 | | * The flow is: First the TEXT query goes to transform() function, which would split the query recursively and then transform the query. |
187 | | * After transforming, the query with TEXT operator will go to fulltext() function and would search for the keywords in the indexed documents. |
188 | | * It will retrieve document ids and then covert into a BELONGS S3ResourceQuery. |
189 | | * The code sample for the fulltext() is in ''models/s3/s3resource.py'' |
| 186 | * So, The process is: |
| 187 | First there will be a filter (a new submodule for TextFilter called FullTextFilter) which would generate the query with the TEXT operator.[[BR]] |
| 188 | Then, The query would do a select() call of the extraction of records with the transform=True parameter.[[BR]] |
| 189 | Then, in select(), we call the resource.get_query -> rfilter.get_query() -> transform()[[BR]] |
| 190 | So, in rfilter.get_query, we will transform the TEXT query to a BELONGS S3ResourceQuery by using transform() and fulltext() function[[BR]] |
| 191 | Note: fulltext() will extract the record ids through Lucene, by giving Lucene the text which the user entered into the filter.[[BR]] |
| 192 | After generating the BELONGS S3ResourceQuery with the set of ids, we he convert it to a DAL Query.[[BR]] |
| 193 | So, this is query is returned back to select and a db call for extracting records from this query(filter) will be extracted.[[BR]] |
| 194 | Finally, we display the records with an extra field into the display which will be the document file field name. |
| 195 | [[BR]] |
| 196 | [[BR]] |
| 197 | Note: Still left to design the structure for extracting snippets from the query and displaying it along with the records are left.(a @ToDo).[[BR]] |
| 198 | |
| 199 | |