?
Solved

ColdFusion Verity search...

Posted on 2011-03-25
1
Medium Priority
?
437 Views
Last Modified: 2012-05-11
I'm creating a search for my website, and I have a question... I was able to create a collection,  and I'm able to search it.

But here is the problem... I can only search using the primary key, how can I make all columns in the database searchable?

Here is the code I have for indexing and for search...



<cfindex collection="orthopedicsurgeon" action="update" type="custom" query="qryGetdoc" 
	     body="ProviderNPI, ProviderLastName, ProviderFirstName, ProviderMiddleName, ProviderBusinessPracticeAddress, ProviderBusinessPracticeAddress2,ProviderBusinessPracticeCity, ProviderBusinessPracticeState, ProviderBusinessPracticePostalCode, PracticeAbout"
         key="ProviderNPI" language="english">


<!----- SEARCH ---->
<cfsearch name="search" collection="orthopedicsurgeon" type="simple" criteria="#q#">

<cfdump var="#search#">

Open in new window

0
Comment
Question by:Medrise
1 Comment
 
LVL 25

Accepted Solution

by:
dgrafx earned 2000 total points
ID: 35221990
ok - this will be condensed - I just posted and my wireless connection dropped and all was lost ...
so anyway

not sure what you mean by "I can only earch by primary key"
what do you really mean? cause that doesn't make sense - might want to reword that

but to answer what i think you might mean
<cfsearch name="search" collection="orthopedicsurgeon" type="simple" criteria="#q#">
<cfif listlen(valuelist(search.key))>
<cfquery ...>
select ...
where ProviderNPI IN (valuelist(search.key))
</cfquery>
then just do an output of the query
</cfif>

good luck ...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question