Thanks for the tip I will try it. As a side note, I wouldn't mind using
an XPath either. Doesn't make much difference to me. Do you happen to
know what this would look like in xpath? Thanks.
Fabián Mandelbaum wrote:
I don't use SQL queries at all (I prefer XPath) with JackRabbit, but
did you try something like the following:
"SELECT * FROM mynt:content, mynt:attachments WHERE CONTAINS(* , '" +
queryString.toLowerCase().trim() + "') order by jcr:score DESC"
That is, select from both 'tables'.
I don't know if it will work, or if it's valid SQL query at all, I'm
just throwing an idea... good luck!
On Tue, Apr 15, 2008 at 11:24 AM, Michael MacFadden <[EMAIL PROTECTED]> wrote:
Hi,
I have a question regarding searching. In my repository, I have two
different node types. One for regular typed in content and one for
attachments. Each of these node types has a node type definition loaded and
they each have different properties. What I want to do is allow the user to
enter a search term and have the content nodes and attachments searched an
provide a single list ordered by the results score. I have the full text
(text extractor) search already working and am using the ScoreNodeIterator.
The issue I have is that since the nodes I am trying to search have two
different types it seems like I need two separate queries:
Content:
"SELECT * FROM mynt:content WHERE CONTAINS(* , '" +
queryString.toLowerCase().trim() + "') order by jcr:score DESC"
Attachments:
"SELECT * FROM mynt:attachments WHERE CONTAINS(* , '" +
queryString.toLowerCase().trim() + "') order by jcr:score DESC"