Kevin
2008-01-30 19:36:44 UTC
Hi,
I am trying to use the full text search to filter content by a field
in one of my container lists.
Normal full text search works fine. I can search across the whole site
and use keywords that are contained in my content.
But, when I try to use the suggested syntax for field searching
(Template developer guide Chapter 5), it doesn't work.
I have also tried to limit to a specific container without success as well.
My example:
I have a container list with a field called mTitle.
I want to specify that field and only return items where that value
exists in that field. Easy right? Help!
I have tried all sort of permutations based on reading the mailing
list as well. No love.
The search syntax SHOULD be "keyword AND fieldname:mTitle". Correct?
I've tried all of the following possibilities (can't hurt to try right?)
statement AND fieldid:mTitle
statement AND fieldid:mtitle
statement AND containerfield_mtitle
statement AND jahia.containerfield_mtitle
statement AND jahia.field_id:mtitle
statement AND jahia.field_id:mTitle
statement AND jahia.field_mTitle
statement AND jahia.field_mtitle
statement AND jahia.field_fieldname:mtitle
statement AND jahia.field_fieldname:mTitle
I have tried all of these with and without the "jahia." prefix.
And, I have another container list (my footer with a single field
called fBody). I have the word footer in it. Normal searching works.
Field searching doesn't work. I've tried all of the following possibilities:
footer AND jahia.container_definition_name:footerContainerList
footer AND container_definition_name:footerContainerList
footer AND container_definition_name:footerContainer
footer AND container_definition_name:mcontentItemPageContainerList
footer AND containerfield_fbody
footer AND jahia.containerfield_fbody
footer AND jahia.field_id:fbody
footer AND jahia.field_id:fBody
footer AND jahia.field_fBody
footer AND jahia.field_fbody
footer AND jahia.field_fieldname:fbody
footer AND jahia.field_fieldname:fBody
footer AND field_id:fbody
footer AND field_id:fBody
footer AND field_fBody
footer AND field_fbody
footer AND field_fieldname:fbody
footer AND field_fieldname:fBody
footer AND container_definition_name:footerContainerList
I have tried all of these with and without the "jahia." prefix. I was
hoping that looking at JahiaSearchConstant was going to be helpful.
Can someone indicate which one of these is valid? If I can clarify
that, I can try to figure out why this isn't working.
It would also be a big boost of confidence if someone can confirm
they've done this before?
Another thought is that one of these IS correct and there could be
something wrong with my search results JSP? I'm using one that's been
slightly modified from the corporate templates. But, I also replaced
it at one point today and also saw no difference.
I'm using jahia5.0.3_r18957.
If it helps at all, this is the search form I'm using. Let me know if
I need to change any sort of parameter's or do something specific to
my search results.
<div class="searchbox">
<form name="searchForm" method="post"
action="<%=jData.gui().html().drawSearchLauncher()%>" >
<input type="text" name="search" class="searchboxborder"
onfocus="this.value=''" />
<input type="hidden" name="maxPageItems" value="10" />
<input type="hidden"
name="<%=PageSearchResultBuilderImpl.ONE_HIT_BY_PAGE_PARAMETER_NAME%>"
value="true" />
<input type="hidden" name="searchView" value="simple" />
<input type="hidden" name="screen" value="execute" />
<input type="hidden" name="freeSearch" value='' />
<input type="hidden"
name="<%=Search_Engine.SEARCH_REFINE_ATTRIBUTE%>" value="" />
<input type="hidden" name="searchHandler" value="search" />
<input type="submit" value="search" />
</form>
</div>
Best regards,
Kevin Hutson
I am trying to use the full text search to filter content by a field
in one of my container lists.
Normal full text search works fine. I can search across the whole site
and use keywords that are contained in my content.
But, when I try to use the suggested syntax for field searching
(Template developer guide Chapter 5), it doesn't work.
I have also tried to limit to a specific container without success as well.
My example:
I have a container list with a field called mTitle.
I want to specify that field and only return items where that value
exists in that field. Easy right? Help!
I have tried all sort of permutations based on reading the mailing
list as well. No love.
The search syntax SHOULD be "keyword AND fieldname:mTitle". Correct?
I've tried all of the following possibilities (can't hurt to try right?)
statement AND fieldid:mTitle
statement AND fieldid:mtitle
statement AND containerfield_mtitle
statement AND jahia.containerfield_mtitle
statement AND jahia.field_id:mtitle
statement AND jahia.field_id:mTitle
statement AND jahia.field_mTitle
statement AND jahia.field_mtitle
statement AND jahia.field_fieldname:mtitle
statement AND jahia.field_fieldname:mTitle
I have tried all of these with and without the "jahia." prefix.
And, I have another container list (my footer with a single field
called fBody). I have the word footer in it. Normal searching works.
Field searching doesn't work. I've tried all of the following possibilities:
footer AND jahia.container_definition_name:footerContainerList
footer AND container_definition_name:footerContainerList
footer AND container_definition_name:footerContainer
footer AND container_definition_name:mcontentItemPageContainerList
footer AND containerfield_fbody
footer AND jahia.containerfield_fbody
footer AND jahia.field_id:fbody
footer AND jahia.field_id:fBody
footer AND jahia.field_fBody
footer AND jahia.field_fbody
footer AND jahia.field_fieldname:fbody
footer AND jahia.field_fieldname:fBody
footer AND field_id:fbody
footer AND field_id:fBody
footer AND field_fBody
footer AND field_fbody
footer AND field_fieldname:fbody
footer AND field_fieldname:fBody
footer AND container_definition_name:footerContainerList
I have tried all of these with and without the "jahia." prefix. I was
hoping that looking at JahiaSearchConstant was going to be helpful.
Can someone indicate which one of these is valid? If I can clarify
that, I can try to figure out why this isn't working.
It would also be a big boost of confidence if someone can confirm
they've done this before?
Another thought is that one of these IS correct and there could be
something wrong with my search results JSP? I'm using one that's been
slightly modified from the corporate templates. But, I also replaced
it at one point today and also saw no difference.
I'm using jahia5.0.3_r18957.
If it helps at all, this is the search form I'm using. Let me know if
I need to change any sort of parameter's or do something specific to
my search results.
<div class="searchbox">
<form name="searchForm" method="post"
action="<%=jData.gui().html().drawSearchLauncher()%>" >
<input type="text" name="search" class="searchboxborder"
onfocus="this.value=''" />
<input type="hidden" name="maxPageItems" value="10" />
<input type="hidden"
name="<%=PageSearchResultBuilderImpl.ONE_HIT_BY_PAGE_PARAMETER_NAME%>"
value="true" />
<input type="hidden" name="searchView" value="simple" />
<input type="hidden" name="screen" value="execute" />
<input type="hidden" name="freeSearch" value='' />
<input type="hidden"
name="<%=Search_Engine.SEARCH_REFINE_ATTRIBUTE%>" value="" />
<input type="hidden" name="searchHandler" value="search" />
<input type="submit" value="search" />
</form>
</div>
Best regards,
Kevin Hutson