Current time: 12-06-2020, 08:01 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Query Search Time
08-13-2010, 09:54 PM (This post was last modified: 08-13-2010 09:56 PM by green-watch.org.)
Post: #11
RE: Database Query Search Time
Hey Guys,

I am having a bit of trouble with SOLR. Here is my code:

Code:
<cfsetting requestTimeOut = "6000">

<cfcollection action="list" name="COLLECTION_LIST" engine="solr">

<cfquery name="PRODUCT_COLLECTION_CHECK" dbtype="query">
SELECT * FROM COLLECTION_LIST  
WHERE COLLECTION_LIST.NAME = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="product_collection">
</cfquery>  

<cfif PRODUCT_COLLECTION_CHECK.RecordCount NEQ 0>

  <p>Collection Exists</p>
  
  <cfquery datasource="#dsnName#" name="PRODUCT_LIST">
  SELECT TOP 100 PRODUCT.PRODUCT_ID, PRODUCT.PRODUCT_PRIORITY_ID, PRODUCT.BUSINESS_ID, PRODUCT.PRODUCT_NAME,
  PRODUCT.PRODUCT_PRICE, PRODUCT.PRODUCT_DESCRIPTION, PRODUCT.PRODUCT_PHOTO, PRODUCT.PRODUCT_KEYWORD1,
  PRODUCT.PRODUCT_KEYWORD2, PRODUCT.PRODUCT_KEYWORD3, PRODUCT.PRODUCT_KEYWORD4, PRODUCT.PRODUCT_GOOGLE_IMAGE_URL,
  PRODUCT.PRODUCT_VALIDATED
  FROM PRODUCT
  WHERE PRODUCT.PRODUCT_INDEXED = <cfqueryparam cfsqltype="CF_SQL_NUMERIC" value="0">
  </cfquery>
  
  <cfset myColumns = 'PRODUCT_NAME,PRODUCT_DESCRIPTION,PRODUCT_KEYWORD1,PRODUCT_KEYWORD2,PRODUCT_KEYW​ORD3,PRODUCT_KEYWORD4'>
  
  <cfindex action="update" collection="product_collection" query="PRODUCT_LIST" type="custom" key="PRODUCT_ID"
  title="PRODUCT_NAME" body="#myColumns#" custom1="BUSINESS_ID" custom2="PRODUCT_PRICE" custom3="PRODUCT_PRIORITY_ID"
  custom4="PRODUCT_VALIDATED">

  <cfsearch collection="product_collection" criteria="custom2: 0 TO 350" name="results" status="r" suggestions="always"
  contextPassages="0">

  <cfdump var="#results#">

  <cfsearch collection="product_collection" criteria="" name="results" status="r" suggestions="always" contextPassages="0">

  <cfdump var="#results#">

<cfelse>

  <p>Collection Does Not Exist</p>

</cfif>

Here is my current testing page for it:
http://www.green-watch.org/test.cfm

How do I get it to return products where the product price is between 0 and 350 dollars? I am trying this in the code: criteria="custom2: 0 TO 350" - but it is not working.

Thanks in advance for any suggestions.

Sincerely,
Travis Walters
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Database Query Search Time - pmeenan - 07-04-2010, 12:03 PM
RE: Database Query Search Time - pmeenan - 07-05-2010, 04:35 AM
RE: Database Query Search Time - sajal - 07-05-2010, 05:03 AM
RE: Database Query Search Time - pmeenan - 07-08-2010, 08:47 PM
RE: Database Query Search Time - green-watch.org - 08-13-2010 09:54 PM
RE: Database Query Search Time - sajal - 08-13-2010, 10:06 PM
RE: Database Query Search Time - sajal - 08-14-2010, 03:38 AM
RE: Database Query Search Time - sajal - 08-14-2010, 06:50 AM
RE: Database Query Search Time - pmeenan - 08-16-2010, 02:55 AM
RE: Database Query Search Time - sajal - 08-17-2010, 01:14 AM
RE: Database Query Search Time - pmeenan - 08-23-2010, 01:22 AM
RE: Database Query Search Time - pmeenan - 08-23-2010, 08:45 PM
RE: Database Query Search Time - ringman57 - 08-24-2010, 11:52 PM
RE: Database Query Search Time - ringman57 - 08-25-2010, 02:54 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)