Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

verity collection and database search problem

$
0
0

Good morning, got a coldfusion question.  I am currently working with coldfusion to create a search engine for a bunch of newspaper PDFs we have.  I am having problem getting the Verity Collection and database to search as one.  Any suggestions on how to get them both to search as one?  Quick side note I have a search form and I have two results form.  One results form is for the database and the other results form is for the Verity Collection.  I have the search form linked to Both results form.  I want to combine both results forms into one results. below is the one results I tried to combine but got an error.

 

<cfquery name="union" dbtype="query">

SELECT digitalnewspaper.county, digitalnewspaper.doi, digitalnewspaper.town,

Newpapers.criteria, Newpapers.Summary, Newpapers.title, Newpapers.Context, digitalnewspaper.newspapername, digitalnewspaper.DOI, digitalnewspaper.town, digitalnewspaper.county

FROM Digitalnewspaper, Newpapers</cfquery>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><CFQUERY DATASOURCE="digitalnewspaper" name="digitalnewspaper">

SELECT *

FROM digitalnewspaper

WHERE 0=0

  <cfif #form.NEWSPAPERNAME# is not "">

  and NEWSPAPERNAME LIKE '#FORM.NEWSPAPERNAME#%'

  </cfif>

  <cfif #form.DOI# is not "">

  AND DOI LIKE '%#FORM.DOI#%'

  </cfif>

  <cfif #form.town# is not "">

  AND town LIKE '%#FORM.town#%'

  </cfif>

  <cfif #form.county# is not "">

  AND county LIKE '%#FORM.county#%'

  </cfif>

ORDER BY newspapername

</cfquery>

<cfset FORM.NEWSPAPERNAME= "NEWSPAPERNAME">

<CFset FORM.DOI= "DOI">

<cfset FORM.TOWN= "TOWN">

<cfset FORM.COUNTY= "COUNTY">

<cfset FORM.CRITERIA= "CRITERIA">

<CFOUTPUT>#NEWSPAPERNAME#<br>

#DOI#<br>

#TOWN#<br>

#COUNTY#<br>

#CRITERIA#

</CFOUTPUT>

<cfsearch Name= "Newpapers_Results"

   collection= "newpapers"

   type="simple"

   criteria= #FORM.CRITERIA#

   Status= "info"

   Suggestions="5"

   ContextHighlightBegin="<b>"

   ContextHighlightEnd="</b>"

   ContextPassages="1"

   ContextBytes="500"

   maxrows= "500">

<cfoutput query="Newpapers_Results">

<p>

<div align="left"><b>File:<a href="#url#"></b>#key#</A><br>

<b>Document Title (if any): #Title#</b><br>

<b>Higlighted Summary:</b> #context#    </p>

<p class="style12"> </p>

</cfoutput></td></tr></table></div>

   </div>

 

<body>

 

  </div>

  <div  id="content">

    <h2 align="center" class="style23">Digital Newspaper Database</h2>

  

  <p align="center"><P></div>

  <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">

 

 

        <cfoutput>

              <p class="style9">Your search returned #digitalnewspaper.RecordCount# records:</p>

        </cfoutput>

        <br>

 

</div>

  <center>

<table width="100%" cellpadding="0" cellspacing="0" border="1">

<tr>

<th class="style9">Name</th>

<th class="style9">DOI</th>

<th class="style9">PAPERID</th>

<th class="style9">STATE</th>

<th class="style9">Town</th>

<th class="style9">County</th>

<th class="style9">NewspaperInfo</th>

<th class="style9">Other Info</th>

</tr>

 

 

<CFOUTPUT QUERY="digitalnewspaper">

<tr>

<td width="20%">

  <div align="left"><span class="style9">#Newspapername#</span> </div></td>

<td width="13%">

<span class="style9">#DOI#</span> </td>

<td width="13%">

<span class="style9">#PAPERID#</span> </td>

<td width="13%" class="style9">

#STATE# </td>

<td width="10%" align="center">

<span class="style9">#town#</span> </td>

<td width="10%">

<span class="style9">#county#</span> </td>

<td width="10%"><span class="style9">#Newspaperinfo#</span> </td>

<td width="14%" class="style9">

#otherinfo# </td>

</tr>

</cfoutput>

</table>

</center>

<p> </p>

div id="context">

<div id="leftcolumn">

<div align="left"><table border="0" cellspacing="30" cellpadding="0"width="0"><tr><td>

</div>

 

<div align="left"><h2 class="style80">Search Results</h2></div>

 

<cfoutput><span class=<"style11"><span class="style27">

Your search returned #newpapers_results.RecordCount# file(s).</span></cfoutput>

<cfif info.Found LTE 5 AND isDefined("info.SuggestedQuery")>

    Did you mean:

    <a href="search,cfm?query=#info.SuggestedQuery#>info.SuggestedQuery#</a>

</cfif>

 

 

<p align="center" class="style9">http://www.archives.alabama.gov/goldstar/results.cfm</p>

<p align="center" class="style9">Updated: February 6, 2014</p>

</center>

 

 

</td>

</tr></table>

</center>

 

  <div id="footer">

    <div id="mission">

      <div align="center">

        <p> </p>

        <p><a href="http://www.archives.alabama.gov/FY09%20Strategic%20Plan%20080902%20(2).pdf" class="style2">&quot;We tell the story of the people of Alabama by preserving records and artifacts of <br />

          historical value and promoting a better understanding of Alabama history.&quot;</a></p>

        <p> </p>

        <p align="center"><span class="style9"><a href="mailto:mark.palmer@archives.alabama.gov" class="style21">Contact Us</a> | <a href="/disclaimer.html" class="style21">Feedback</a> | <a href="http://www.archives.alabama.gov/adahindx.html" class="style21">Site Index</a></span><span class="style18"> | <span class="style9">Translate</span> | </span><span class="style9"><a href="http://www.alabama.gov/portal/index.jsp" class="style21">Alabama.gov</a></span></p>

        <p align="center"> </p>

      </div>

    </div>

    <div align="center">

      <p align="center" class="style1"><span class="style2"><a href="http://www.archives.alabama.gov"><img src="/adahlogo.JPG" alt="ADAH Logo" width="114" height="100" border="0" /></a></span></p>

      <p align="center" class="style1"> </p>

      <p align="center" class="style2">P.O. Box 300100 / 624 Washington Ave.</p>

      <p align="center" class="style2">Montgomery, AL 36130</p>

      <p align="center" class="style2"> (334) 242-4435</p>

    </div>

  </div>

</div>

<!-- InstanceEndEditable -->

</body>

<!-- InstanceEnd --></html>


Viewing all articles
Browse latest Browse all 5794

Trending Articles