Jahia in English > Jahia searches only...

0 (0 Good)
0 (0 Bad)

Jahia searches only documents

by  mholmberg »  2013/12/03 09:54

Hello,

 

I am deploying a simple-search-form in my Jahia site. When I perform the search it only hits documents and not only content. The results are therefore only documents like pdf, words, excel but not the content of the pages. I could not find out how to change the settings in order to make the search also look into the content. Here is how the code looks like

 

<form name="searchForm" action="/cms/render/default/en/sites/glad/sokning.html" class="simplesearchform" method="post">
    <input type="hidden" name="jcrMethodToCall" value="get">
    <input type="hidden" name="src_originSiteKey" value="Glad">
    <input id="searchTerm" name="src_terms[0].term" onblur="if(this.value=='')this.value='';" class="text-input" onfocus="if(this.value=='')this.value='';" type="text" value="">
<input type="hidden" name="src_terms[0].applyFilter" value="true">
<input type="hidden" name="src_terms[0].match" value="all_words">
<input type="hidden" name="src_terms[0].fields.siteContent" value="true">
<input type="hidden" name="src_terms[0].fields.tags" value="true">
<input type="hidden" name="src_sites.values" value="Glad"><input type="hidden" name="src_sitesForReferences.values" value="systemsite">
<input type="hidden" name="src_languages.values" value="en"><input class="searchsubmit" type="submit" title="Sök" value="Sök">
</form>
 
 
any help?
 
Thanks
  • Jahia searches only documents
    2013/12/03 09:54

    mholmberg <p> Hello,</p> <p> &nbsp;</p> <p> I am deploying a simple-search-form in my Jahia site. When I perform the search it only hits documents and not only content. The results are therefore only documents like pdf, words, excel but not the content of the pages. I could not find out how to change the settings in order to make the search also look into the content. Here is how the code looks like</p> <p> &nbsp;</p> <div> &lt;form name=&quot;searchForm&quot; action=&quot;/cms/render/default/en/sites/glad/sokning.html&quot; class=&quot;simplesearchform&quot; method=&quot;post&quot;&gt;</div> <div> &nbsp; &nbsp; &lt;input type=&quot;hidden&quot; name=&quot;jcrMethodToCall&quot; value=&quot;get&quot;&gt;</div> <div> &nbsp; &nbsp; &lt;input type=&quot;hidden&quot; name=&quot;src_originSiteKey&quot; value=&quot;Glad&quot;&gt;</div> <div> &nbsp; &nbsp; &lt;input id=&quot;searchTerm&quot; name=&quot;src_terms[0].term&quot; onblur=&quot;if(this.value==&#39;&#39;)this.value=&#39;&#39;;&quot; class=&quot;text-input&quot; onfocus=&quot;if(this.value==&#39;&#39;)this.value=&#39;&#39;;&quot; type=&quot;text&quot; value=&quot;&quot;&gt;</div> <div> &lt;input type=&quot;hidden&quot; name=&quot;src_terms[0].applyFilter&quot; value=&quot;true&quot;&gt;</div> <div> &lt;input type=&quot;hidden&quot; name=&quot;src_terms[0].match&quot; value=&quot;all_words&quot;&gt;</div> <div> &lt;input type=&quot;hidden&quot; name=&quot;src_terms[0].fields.siteContent&quot; value=&quot;true&quot;&gt;</div> <div> &lt;input type=&quot;hidden&quot; name=&quot;src_terms[0].fields.tags&quot; value=&quot;true&quot;&gt;</div> <div> &lt;input type=&quot;hidden&quot; name=&quot;src_sites.values&quot; value=&quot;Glad&quot;&gt;&lt;input type=&quot;hidden&quot; name=&quot;src_sitesForReferences.values&quot; value=&quot;systemsite&quot;&gt;</div> <div> &lt;input type=&quot;hidden&quot; name=&quot;src_languages.values&quot; value=&quot;en&quot;&gt;&lt;input class=&quot;searchsubmit&quot; type=&quot;submit&quot; title=&quot;S&ouml;k&quot; value=&quot;S&ouml;k&quot;&gt;</div> <div> &lt;/form&gt;</div> <div> &nbsp;</div> <div> &nbsp;</div> <div> any help?</div> <div> &nbsp;</div> <div> Thanks</div>

  • Number of messages  22
    Registration date Dec 3, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Jahia searches only documents

    by  shyrkov »  2013/12/04 21:54

    Hello Maria,

     

    looks strange, as the generated HTML output seems to be correct.

    Could you double-check if the issue is not with the site key?

    The

    <input type="hidden" name="src_originSiteKey" value="Glad">

    and

    <input type="hidden" name="src_sites.values" value="Glad">

     

    contain 'Glad' as the site key, where as the site key is 'glad' (lowercase), I suppose.

     

    Kind regards

    Sergiy

  • Re: Jahia searches only documents
    2013/12/04 21:55

    shyrkov <p> Hello Maria,</p> <p> &nbsp;</p> <p> looks strange, as the generated HTML output seems to be correct.</p> <p> Could you double-check if the issue is not with the site key?</p> <p> The</p> <p> &lt;input type=&quot;hidden&quot; name=&quot;src_originSiteKey&quot; value=&quot;Glad&quot;&gt;</p> <p> and</p> <p> &lt;input type=&quot;hidden&quot; name=&quot;src_sites.values&quot; value=&quot;Glad&quot;&gt;</p> <p> &nbsp;</p> <p> contain &#39;Glad&#39; as the site key, where as the site key is &#39;glad&#39; (lowercase), I suppose.</p> <p> &nbsp;</p> <p> Kind regards</p> <p> Sergiy</p>

  • Number of messages  407
    Registration date Dec 4, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Jahia searches only documents

    by  mholmberg »  2013/12/05 08:42

    I did check, but the output looks correct actually I think there has been a mistake with copy/paste but 

    <form name="searchForm" action="/cms/render/default/en/sites/Glad/sokning.html" class="simplesearchform" method="post">

    is the right one. I just can not understand why and where to put my hands on this issue

  • Re: Re: Jahia searches only documents
    2013/12/05 08:42

    mholmberg <p> I did check, but the output looks correct actually I think there has been a mistake with copy/paste but&nbsp;</p> <p> <span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px;">&lt;form name=&quot;searchForm&quot; action=&quot;/cms/render/default/en/sites/Glad/sokning.html&quot; class=&quot;simplesearchform&quot; method=&quot;post&quot;&gt;</span></p> <p> is the right one. I just can not understand why and where to put my hands on this issue</p>

  • Number of messages  22
    Registration date Dec 5, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Jahia searches only documents

    by  shyrkov »  2013/12/05 11:15

    Hello,

    could you activate the DEBUG level for the org.jahia.services.search.jcr.JahiaJCRSearchProvider class via http://localhost:8080/tools/log4jAdmin.jsp

    Execute the search, please, and provide the log output here.

     

    Kind regards

    Sergiy

  • Re: Re: Re: Jahia searches only documents
    2013/12/05 11:15

    shyrkov <p> Hello,</p> <p> could you activate the DEBUG level for the org.jahia.services.search.jcr.JahiaJCRSearchProvider class via http://localhost:8080/tools/log4jAdmin.jsp</p> <p> Execute the search, please, and provide the log output here.</p> <p> &nbsp;</p> <p> Kind regards</p> <p> Sergiy</p>

  • Number of messages  407
    Registration date Dec 5, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: Jahia searches only documents

    by  mholmberg »  2013/12/05 14:13

    Hello,

    I did the debug mode for the JCRSearchProvider and here is the input

    2013-12-05 15:07:21,638: INFO  [http-8082-1] org.jahia.bin.Render: Rendered [/cms/render/default/en/sites/Glad/sokning.html] user=[root] ip=[188.95.34.210] sessionID=[6F5E10FCD407D9E0A374213DC4AC3BF8] in [471ms]

    2013-12-05 15:07:49,504: DEBUG [http-8082-5] org.jahia.services.search.jcr.JahiaJCRSearchProvider: XPath query built: /jcr:root/sites/*[fn:name() = 'Glad' or fn:name() = 'systemsite']/*[@j:isHomePage='true' or fn:name() = 'files' or fn:name() = 'contents']//element(*,nt:base)[(jcr:contains(., 'portal') or jcr:contains(@jcr:title, 'portal')) and (@jcr:language = 'en' or not(@jcr:language))] order by jcr:score() descending

    2013-12-05 15:07:49,507: DEBUG [http-8082-5] org.jahia.services.search.jcr.JahiaJCRSearchProvider: Executing search query [/jcr:root/sites/*[fn:name() = 'Glad' or fn:name() = 'systemsite']/*[@j:isHomePage='true' or fn:name() = 'files' or fn:name() = 'contents']//element(*,nt:base)[(jcr:contains(., 'portal') or jcr:contains(@jcr:title, 'portal')) and (@jcr:language = 'en' or not(@jcr:language))] order by jcr:score() descending]

    2013-12-05 15:07:49,536: DEBUG [http-8082-5] org.jahia.services.search.jcr.JahiaJCRSearchProvider: Search query has 0 results

    2013-12-05 15:07:49,540: DEBUG [http-8082-5] org.jahia.services.search.jcr.JahiaJCRSearchProvider: Making spell check suggestion for 'portal' site 'Glad' and locale 'en' using XPath query [/jcr:root[rep:spellcheck('portal') or @jcr:language='en']/sites/Glad/(rep:spellcheck())]. Result suggestion: null

     

    and there is text that contains the word portal 

     

  • Re: Re: Re: Re: Jahia searches only documents
    2013/12/05 14:13

    mholmberg <p> Hello,</p> <p> I did the debug mode for the JCRSearchProvider and here is the input</p> <p class="p1"> 2013-12-05 15:07:21,638: INFO&nbsp; [http-8082-1] org.jahia.bin.Render: Rendered [/cms/render/default/en/sites/Glad/sokning.html] user=[root] ip=[188.95.34.210] sessionID=[6F5E10FCD407D9E0A374213DC4AC3BF8] in [471ms]</p> <p class="p1"> 2013-12-05 15:07:49,504: DEBUG [http-8082-5] org.jahia.services.search.jcr.JahiaJCRSearchProvider: XPath query built: /jcr:root/sites/*[fn:name() = &#39;Glad&#39; or fn:name() = &#39;systemsite&#39;]/*[@j:isHomePage=&#39;true&#39; or fn:name() = &#39;files&#39; or fn:name() = &#39;contents&#39;]//element(*,nt:base)[(jcr:contains(., &#39;portal&#39;) or jcr:contains(@jcr:title, &#39;portal&#39;)) and (@jcr:language = &#39;en&#39; or not(@jcr:language))] order by jcr:score() descending</p> <p class="p1"> 2013-12-05 15:07:49,507: DEBUG [http-8082-5] org.jahia.services.search.jcr.JahiaJCRSearchProvider: Executing search query [/jcr:root/sites/*[fn:name() = &#39;Glad&#39; or fn:name() = &#39;systemsite&#39;]/*[@j:isHomePage=&#39;true&#39; or fn:name() = &#39;files&#39; or fn:name() = &#39;contents&#39;]//element(*,nt:base)[(jcr:contains(., &#39;portal&#39;) or jcr:contains(@jcr:title, &#39;portal&#39;)) and (@jcr:language = &#39;en&#39; or not(@jcr:language))] order by jcr:score() descending]</p> <p class="p1"> 2013-12-05 15:07:49,536: DEBUG [http-8082-5] org.jahia.services.search.jcr.JahiaJCRSearchProvider: Search query has 0 results</p> <p class="p1"> 2013-12-05 15:07:49,540: DEBUG [http-8082-5] org.jahia.services.search.jcr.JahiaJCRSearchProvider: Making spell check suggestion for &#39;portal&#39; site &#39;Glad&#39; and locale &#39;en&#39; using XPath query [/jcr:root[rep:spellcheck(&#39;portal&#39;) or @jcr:language=&#39;en&#39;]/sites/Glad/(rep:spellcheck())]. Result suggestion: null</p> <p class="p1"> &nbsp;</p> <p class="p1"> and there is text that contains the word portal&nbsp;</p> <p class="p1"> &nbsp;</p>

  • Number of messages  22
    Registration date Dec 5, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: Re: Jahia searches only documents

    by  shyrkov »  2013/12/05 17:12

    The query seems good.

    Is the text "portal" present in the English content of the site Glad?

  • Re: Re: Re: Re: Re: Jahia searches only documents
    2013/12/05 17:12

    shyrkov <p> The query seems good.</p> <p> Is the text &quot;portal&quot; present in the English content of the site Glad?</p>

  • Number of messages  407
    Registration date Dec 5, 2013
    0 (0 Good)
    0 (0 Bad)

    Re : Re: Re: Re: Re: Jahia searches only documents

    by  fabu »  2013/12/05 21:50

    Hi,

    Test your xpath query into /tools/jcrQuery.jsp

    Issue may comes from indexation rather than your form?

    If you have no result, then launch a reindexation?

    Best regards, 

  • Re : Re: Re: Re: Re: Jahia searches only documents
    2013/12/05 21:50

    fabu <p> Hi,</p> <p> Test your xpath query into /tools/jcrQuery.jsp</p> <p> Issue may comes from indexation rather than your form?</p> <p> If you have no result, then launch a reindexation?</p> <p> Best regards,&nbsp;</p>

  • Number of messages  28
    Registration date Dec 5, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re : Re: Re: Re: Re: Jahia searches only documents

    by  mholmberg »  2013/12/06 08:23

    The query in the tools section displays results correctly while I don't see the same output in the portal page. 

  • Re: Re : Re: Re: Re: Re: Jahia searches only documents
    2013/12/06 08:23

    mholmberg <p> The query in the tools section displays results correctly while I don&#39;t see the same output in the portal page.&nbsp;</p>

  • Number of messages  22
    Registration date Dec 6, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re : Re: Re: Re: Re: Jahia searches only documents

    by  pap@commaro.com »  2013/12/06 15:02

    Hello,

    please post a path to a node which is containing the searched keyword and which should have been found.

    Are you searching in edit, contribute, preview or live mode? Does the user doing the search have rights to see that content?

    Regards,
    Benjamin

    Benjamin Papez (pap@commaro.com)

    Number of messages  220
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re : Re: Re: Re: Re: Jahia searches only documents

    by  mholmberg »  2013/12/09 08:48

    Hello, 

    I did not get the first line?

    I am logged in as superadmin/root and I am searching both in preview/live mode.

    Best

     

  • Re: Re: Re: Re : Re: Re: Re: Re: Jahia searches only documents
    2013/12/09 08:48

    mholmberg <p> Hello,&nbsp;</p> <p> I did not get the first line?</p> <p> I am logged in as superadmin/root and I am searching both in preview/live mode.</p> <p> Best</p> <p> &nbsp;</p>

  • Number of messages  22
    Registration date Dec 9, 2013
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page