Title:
Bug 84424:Ability to use <cfquery> for collection searchIt would be great to have the possibility to write queries for Solr and Verity collections using the <cfquery> tag
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/
Reporter/Name(from Bugbase): Sebastian Zartner / Sebastian Zartner (Sebastian Zartner)
Created: 09/28/2010
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 1
Problem:
Ability to use <cfquery> for collection searchIt would be great to have the possibility to write queries for Solr and Verity collections using the <cfquery> tag.I am thinking of two ways how this could be done:1. Simple way<cfquery> would get a new option "collection" for its attribute "dbtype" and would adopt all tag attributes of <cfsearch>.A simple example query would then look like this:<cfquery name="artist" dbtype="collection" collection="artists"> madonna~</cfquery>Advantage: Unification of query functionalityDisadvantage: <cfquery> gets flooded with new attributes2. Advanced way<cfquery> would get a new option "collection" for its attribute "dbtype" and the attributes of <cfsearch> would be implemented using an SQL-like syntax.Simple example:<cfquery name="artist" dbtype="collection"> FROM artists WHERE name LIKE 'madonna~'</cfquery>Advantages: Unification of query functionality; ability to use known SQL syntaxDisadvantages: "SQL" syntax would have to be created; users would need to learn the new syntaxHere's a demonstration of how the different <cfsearch> attributes could be implemented into this syntax:<cfquery name="artist" dbtype="collection"> SELECT context, custom1, custom2, score FROM artists WHERE custom1 LIKE 'madonna~' HIGHLIGHT '<b>', '</b>' CONTEXT_PASSAGES 3 LIMIT 1, 10</cfquery>Thereby the columns "context", "custom1", "custom2" and "score" are representing the appropriate columns of the query result returned by <cfsearch> (note that the fields custom1 - custom4 should be renamable), "artists" is the name of the collection and "madonna~" the criteria. "HIGHLIGHT" covers the attributes "contextHighlightBegin" and "contextHighlightEnd", "CONTEXT_PASSAGES" the attribute "contextPassages" and "LIMIT" the attributes "startRow" and "maxRows" of <cfsearch>.Of course this is just a first idea of how this could look like, but I think it could be much easier for people starting with collections using this approach than with using the current <cfsearch>.
Method:
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3042280
External Customer Info:
External Company:
External Customer Name: Sebastian Zartner
External Customer Email: 4E7365D64550DB12992015D5
External Test Config: 09/28/2010
Attachments:
Comments: