joepeacock
Programmer
I'm trying to create Verity indexes for several columns of data based on a joined query. First, here's my code:
I'm putting this in five different indexes because I think it will be faster than putting all five columns into the same index. And I'm assigning different ID numbers on each index so that when I search them all together, all results will be returned and I can use a query to find the distinct records.
The indexing goes without error, but a this code...
... returns nothing.
I'm sure anyone who has used Verity with success will be able to look at this, call me stupid, and point to the obvious problem. So, go for it.
Joe
Code:
<cfquery name="getcustomers" datasource="thedsn">
SELECT (C.custid) AS AID,(C.custid + 0.1) AS BID,(C.custid + 0.2) AS CID,(C.custid + 0.3) AS DID,(C.custid + 0.4) AS EID, C.custid,C.custname,C.company,S.repName,D.division,C.products,C.notes
FROM customers C, salesReps S, divisions D
WHERE C.repID = S.repID
AND C.divID = D.divID
ORDER BY C.custid
</cfquery>
<cfindex query="getcustomers" collection="custReps" key="AID" action="refresh" custom1="custid" type="custom" title="rep" body="repName">
<cfindex query="getcustomers" collection="custCompanies" key="BID" action="refresh" custom1="custid" type="custom" title="company" body="company">
<cfindex query="getcustomers" collection="custNames" key="CID" action="refresh" custom1="custid" type="custom" title="custName" body="custName">
<cfindex query="getcustomers" collection="custDiv" key="DID" action="refresh" custom1="custid" type="custom" title="disvision" body="division">
<cfindex query="getcustomers" collection="custNotes" key="EID" action="refresh" custom1="custid" type="custom" title="notes" body="notes">
I'm putting this in five different indexes because I think it will be faster than putting all five columns into the same index. And I'm assigning different ID numbers on each index so that when I search them all together, all results will be returned and I can use a query to find the distinct records.
The indexing goes without error, but a this code...
Code:
<cfsearch name = "getC" collection = "custReps,custCompanies,custNames,custDiv,custNotes" type = "simple">
I'm sure anyone who has used Verity with success will be able to look at this, call me stupid, and point to the obvious problem. So, go for it.
Joe