• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Multiple CFINDEX

Contributor ,
Jan 10, 2007 Jan 10, 2007

Copy link to clipboard

Copied

Is it possible to run multiple CFINDEX (on DB query on different datasource) in a same cfm file ?
When doing that, I have strange result.
When searching for a keyword, it is found from some of the cfindex (on query) and not from others.

Example , searching for "piano"
If I use a single CFINDEX , then it is retrieved.
If I use several CFINDEX, depending which one, it is not found anymore.

Thanks for any help

Here is the code used :

<CFQUERY NAME="article" datasource="#Article_datasource#">
SELECT A_contenu,dt_titre,dt_id from dossier_tech
inner join articles on articles.a_id=dossier_tech.dt_a_id
</CFQUERY>
<cfindex action="update"
collection="arpille_site"
key="dt_id"
type="CUSTOM"
title="s_article"
query="article"
body="a_contenu,dt_titre">



<CFQUERY NAME="activite" datasource="#asv_datasource#">
SELECT societe,societe_activite,act_id from activite
</CFQUERY>
<cfindex action="update"
collection="arpille_site"
key="act_id"
type="CUSTOM"
title="s_activite"
query="activite"
body="societe,societe_activite">



<CFQUERY NAME="service" datasource="#asv_datasource#">
SELECT societe,societe_service,ser_id from service
</CFQUERY>
<cfindex action="update"
collection="arpille_site"
key="ser_id"
type="CUSTOM"
title="s_service"
query="service"
body="societe,societe_service">


<CFQUERY NAME="forum" datasource="#forum_datasource#">
SELECT quest_topic_id,quest_id,quest_text,quest_sujet,ans_text from answers
inner join questions on answers.ans_quest_id=questions.quest_id
</CFQUERY>
<cfindex action="update"
collection="arpille_site"
key="quest_id"
type="CUSTOM"
title="s_forum"
query="forum"
body="quest_text,quest_sujet,ans_text">


<CFQUERY NAME="agenda" datasource="#Article_datasource#">
SELECT ag_titre,ag_des,ag_id from agenda
</CFQUERY>
<cfindex action="update"
collection="arpille_site"
key="ag_id"
type="CUSTOM"
title="s_agenda"
query="agenda"
body="ag_titre,ag_des">

<CFQUERY NAME="annonce" datasource="#Article_datasource#">
SELECT an_titre,an_des,an_id from annonces
</CFQUERY>
<cfindex action="update"
collection="arpille_site"
key="an_id"
type="CUSTOM"
title="s_annonce"
query="annonce"
body="an_titre,an_des">
TOPICS
Advanced techniques

Views

681

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 13, 2007 Jan 13, 2007

Copy link to clipboard

Copied

I am just adding additionnal informations for the problem.

Using these mutiple CFINDEXING, make that for a same table (ans same datasoource)
some text are retrived , and some others NO !
I do not understand why ?

Is there any body from Adobe, or ex Macromedia who could help on this question ?

Thanks to all.
Pierre.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 17, 2007 Jan 17, 2007

Copy link to clipboard

Copied

Did you ever figure this out? I'm having very similar problems.

Does it work fine if you do them in seperate CFMs?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 21, 2009 Feb 21, 2009

Copy link to clipboard

Copied

I am still trying to understand that problem with multiple cfindex,

I think I unsderstand something :
If I first do a cfindex on a query 1 : it keeps the record keys
when running a second cfindex, if the key found have the same value (from another table)
it takes the last , and the first found in first cfindex is lost.

So how to use the "key" in cfindex to work with multiple cfindex with different cfquery ?

This is what I am looking for now.

Thanks for any help.
Adobe people do not care of this Forum ? why did they buy ColdFusion ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 21, 2009 Feb 21, 2009

Copy link to clipboard

Copied

LATEST
I finally found the solution,

the keys found in all CFindex must be different.
So if I use an primary key for the key, which is a numeric,
there is a chance to find the same number with different cfindex,

So the key of cfindex should refer to table column which have different data (unic).
It better to refer to a field containing text than a numeric.
Text have more chance to be different.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation