Re: 'wildcard search' without wildcards

David Richter <[email protected]> Mon, 14 Jan 2013 14:40:01 +0100
Newsgroups gmane.comp.cms.lenya.user
Message-ID <CAOoFXmF+Zbn-XYjS+VBdfOdLm2Src66=weK0+tsf_DXr4nW_eg@mail.gmail.com>
--f46d0438904d272c4c04d33fc8b3
Content-Type: text/plain; charset=ISO-8859-1

Hi Andreas,

Great, that works :)

But..
The titles of the search results from external publications are not
displayed correctly and instead 'No Title' is displayed. Also the link does
not work.

The search results that have been found within its own publication are
displayed correctly and also the link works. I think there is a problem with
the access to the content of external publications(?), cause the content
folder is located within the various publications.

Do you have any idea about this case?

Thanks, David


2013/1/14 Andreas Hartmann <[email protected]>

> Hi David,
>
> Am 14.01.13 10:10, schrieb David Richter:
>
>> I still have a problem with the search across all publications.
>> After I changed the path in the lucene_index.xml files for various
>> publications, the search delivers no more results. I restarted the
>> Tomcat already.The folder for the new path is created automatically in
>>
>> the file system and a file named 'segments' was created. In the original
>> location (within the publications) are a few more files with the file
>> extensions 'cfs' and 'del' and a file named 'deletable'... I don'tknow
>> how the files were created. I've noticed that the content of the folder
>> determines which search results are displayed.
>>
>> Is there maybe a script that I have to start, so that all required files
>> are generated? Or do I have to edit another configuration file?
>>
>
> in the "File" menu, you should find an entry "Re-index site" (or similar).
> Can you try that? You'll probably have to do it for all publications.
>
> -- Andreas
>
>
>
>  2013/1/9 Andreas Hartmann <[email protected] <mailto:[email protected]
>> >>
>>
>>
>>     Hi David,
>>
>>     Am 09.01.13 15:24, schrieb David Richter:
>>
>>         I am very new to Lenya and hope you can help me. I use Lenya in
>>         version
>>         2.0.4 on an Apache Tomcat 6.0.36 server and I have two questions
>>         about
>>         the search function of Lenya.
>>
>>         First
>>         Is there a way to change the search function, so that the
>> 'wildcard
>>         search' also works without wildcards (without Java programming)?
>>         As if
>>         we were always search with using wildcardsat the end.
>>
>>         For example: The search for "devel" would then deliver words like
>>         "developer" as a result. This currently only works with the use of
>>         wildcards... like this --> "devel*"
>>
>>
>>     I doubt that this is possible without writing any code. Lenya uses
>>     Lucene for searching, with the standard Lucene query syntax.
>>
>>     http://wiki.apache.org/lucene-**__java/LuceneFAQ#What_**
>> wildcard___search_support_is_**available___from_Lucene.3F<http://wiki.apache.org/lucene-__java/LuceneFAQ#What_wildcard___search_support_is_available___from_Lucene.3F>
>>
>>     <http://wiki.apache.org/**lucene-java/LuceneFAQ#What_**
>> wildcard_search_support_is_**available_from_Lucene.3F<http://wiki.apache.org/lucene-java/LuceneFAQ#What_wildcard_search_support_is_available_from_Lucene.3F>
>> >
>>
>>     A simple workaround might be to use JavaScript to wrap each search
>>     term in wildcards before submitting the search form.
>>
>>
>>         Second
>>         For me, the search currently only works within a publication. Is
>>         there a
>>         way to search across all publications (also without Java
>>         programming)?
>>
>>
>>     This should be possible by configuring a shared search index
>>     directory in all publications: <pub>/config/search/lucene-__**
>> index.xml.
>>
>>     More info:
>>     http://lenya.apache.org/__**docu20/tutorials/__**
>> newPublication14.html#N100C5<http://lenya.apache.org/__docu20/tutorials/__newPublication14.html#N100C5>
>>
>>     <http://lenya.apache.org/**docu20/tutorials/**
>> newPublication14.html#N100C5<http://lenya.apache.org/docu20/tutorials/newPublication14.html#N100C5>
>> >
>>
>>     Basically, instead of using the path
>>
>>        lenya/pubs/$MYPUB/work/lucene/**__index
>>
>>
>>     you could use something like
>>
>>        /var/lenya/lucene/index
>>
>>     I would recommend to store all data (content, access control data,
>>     search index) outside the web application directory anyways.
>>
>>     HTH,
>>     -- Andreas
>>
>>     --
>>     Andreas Hartmann, CTO
>>     BeCompany GmbH
>>     http://www.becompany.ch
>>     Tel.: +41 (0) 43 818 57 01 <tel:%2B41%20%280%29%2043%**
>> 20818%2057%2001>
>>
>>
>>     ------------------------------**__----------------------------**
>> --__---------
>>     To unsubscribe, e-mail: [email protected].**__org
>>     <mailto:user-unsubscribe@**lenya.apache.org<[email protected]>
>> >
>>
>>     For additional commands, e-mail: [email protected]
>>     <mailto:user-help@lenya.**apache.org <[email protected]>>
>>
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: [email protected].**org<[email protected]>
> For additional commands, e-mail: [email protected]
>
>

--f46d0438904d272c4c04d33fc8b3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Andreas,<br><br><span id=3D"result_box" class=3D""=
 lang=3D"en"><span class=3D"">Great</span><span>, that works :)<br><br>But.=
.<br></span><span class=3D"">The</span> <span class=3D"">title</span>s <spa=
n class=3D"">of the</span> <span class=3D"">search results from</span> <spa=
n class=3D"">external publications</span> <span class=3D"">are not displaye=
d correctly</span> <span class=3D"">and instead</span> <span class=3D"">&#3=
9;</span><span>No Title</span><span>&#39; is displayed.</span> </span><span=
 id=3D"result_box" class=3D"" lang=3D"en"><span id=3D"result_box" class=3D"=
" lang=3D"en"><span class=3D"">Also</span> <span class=3D"">the</span> <spa=
n class=3D"">link does not work</span><span class=3D"">. </span></span><spa=
n class=3D""><br>
<br>The search results</span> <span class=3D"">that have been found</span> =
<span class=3D"">within its own</span> <span class=3D"">publication</span><=
span> are displayed</span> <span class=3D"">correctly</span> <span class=3D=
"">and</span> <span class=3D"">also</span> <span class=3D"">the link work</=
span><span>s.</span> <span class=3D"">I think</span> <span class=3D"">there=
 is a problem</span> <span class=3D"">with the access to the</span> <span c=
lass=3D"">content of external publications</span><span class=3D"">(?), </sp=
an></span><span id=3D"result_box" class=3D"" lang=3D"en"><span class=3D"">c=
ause</span> <span class=3D"">the</span> <span class=3D"">content folder</sp=
an> <span class=3D"">is located</span> <span class=3D"">within the </span><=
/span><span id=3D"result_box" class=3D"" lang=3D"en"><span class=3D"">vario=
us </span><span class=3D"">publications</span><span class=3D"">.</span></sp=
an><br>
<br><span id=3D"result_box" class=3D"" lang=3D"en"><span class=3D"">Do you =
have</span> <span class=3D"">any</span> <span class=3D"">idea</span> <span =
class=3D"">about</span> <span class=3D"">this case</span><span>?<br><br></s=
pan></span></div>
<span id=3D"result_box" class=3D"" lang=3D"en"><span>Thanks, David<br></spa=
n></span></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote=
">2013/1/14 Andreas Hartmann <span dir=3D"ltr">&lt;<a href=3D"mailto:andrea=
[email protected]" target=3D"_blank">[email protected]</a>&gt;</span><br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hi David,<br>
<br>
Am 14.01.13 10:10, schrieb David Richter:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div class=3D"im">
I still have a problem with the search across all publications.<br>
After I changed the path in the lucene_index.xml files for various<br>
publications, the search delivers no more results. I restarted the<br></div=
>
Tomcat already.The folder for the new path is created automatically in<div =
class=3D"im"><br>
the file system and a file named &#39;segments&#39; was created. In the ori=
ginal<br>
location (within the publications) are a few more files with the file<br>
extensions &#39;cfs&#39; and &#39;del&#39; and a file named &#39;deletable&=
#39;... I don&#39;tknow<br>
how the files were created. I&#39;ve noticed that the content of the folder=
<br>
determines which search results are displayed.<br>
<br>
Is there maybe a script that I have to start, so that all required files<br=
>
are generated? Or do I have to edit another configuration file?<br>
</div></blockquote>
<br>
in the &quot;File&quot; menu, you should find an entry &quot;Re-index site&=
quot; (or similar). Can you try that? You&#39;ll probably have to do it for=
 all publications.<br>
<br>
-- Andreas<br>
<br>
<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
2013/1/9 Andreas Hartmann &lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a> &lt;mailto:<a href=3D"mailto:andreas@apa=
che.org" target=3D"_blank">[email protected]</a>&gt;&gt;<div class=3D"im">=
<br>
<br>
=A0 =A0 Hi David,<br>
<br>
=A0 =A0 Am 09.01.13 15:24, schrieb David Richter:<br>
<br>
=A0 =A0 =A0 =A0 I am very new to Lenya and hope you can help me. I use Leny=
a in<br>
=A0 =A0 =A0 =A0 version<br>
=A0 =A0 =A0 =A0 2.0.4 on an Apache Tomcat 6.0.36 server and I have two ques=
tions<br>
=A0 =A0 =A0 =A0 about<br>
=A0 =A0 =A0 =A0 the search function of Lenya.<br>
<br>
=A0 =A0 =A0 =A0 First<br>
=A0 =A0 =A0 =A0 Is there a way to change the search function, so that the &=
#39;wildcard<br>
=A0 =A0 =A0 =A0 search&#39; also works without wildcards (without Java prog=
ramming)?<br>
=A0 =A0 =A0 =A0 As if<br>
=A0 =A0 =A0 =A0 we were always search with using wildcardsat the end.<br>
<br>
=A0 =A0 =A0 =A0 For example: The search for &quot;devel&quot; would then de=
liver words like<br>
=A0 =A0 =A0 =A0 &quot;developer&quot; as a result. This currently only work=
s with the use of<br>
=A0 =A0 =A0 =A0 wildcards... like this --&gt; &quot;devel*&quot;<br>
<br>
<br>
=A0 =A0 I doubt that this is possible without writing any code. Lenya uses<=
br>
=A0 =A0 Lucene for searching, with the standard Lucene query syntax.<br>
<br></div>
=A0 =A0 <a href=3D"http://wiki.apache.org/lucene-__java/LuceneFAQ#What_wild=
card___search_support_is_available___from_Lucene.3F" target=3D"_blank">http=
://wiki.apache.org/lucene-<u></u>__java/LuceneFAQ#What_<u></u>wildcard___se=
arch_support_is_<u></u>available___from_Lucene.3F</a><div class=3D"im">
<br>
=A0 =A0 &lt;<a href=3D"http://wiki.apache.org/lucene-java/LuceneFAQ#What_wi=
ldcard_search_support_is_available_from_Lucene.3F" target=3D"_blank">http:/=
/wiki.apache.org/<u></u>lucene-java/LuceneFAQ#What_<u></u>wildcard_search_s=
upport_is_<u></u>available_from_Lucene.3F</a>&gt;<br>

<br>
=A0 =A0 A simple workaround might be to use JavaScript to wrap each search<=
br>
=A0 =A0 term in wildcards before submitting the search form.<br>
<br>
<br>
=A0 =A0 =A0 =A0 Second<br>
=A0 =A0 =A0 =A0 For me, the search currently only works within a publicatio=
n. Is<br>
=A0 =A0 =A0 =A0 there a<br>
=A0 =A0 =A0 =A0 way to search across all publications (also without Java<br=
>
=A0 =A0 =A0 =A0 programming)?<br>
<br>
<br>
=A0 =A0 This should be possible by configuring a shared search index<br></d=
iv>
=A0 =A0 directory in all publications: &lt;pub&gt;/config/search/lucene-__<=
u></u>index.xml.<br>
<br>
=A0 =A0 More info:<br>
=A0 =A0 <a href=3D"http://lenya.apache.org/__docu20/tutorials/__newPublicat=
ion14.html#N100C5" target=3D"_blank">http://lenya.apache.org/__<u></u>docu2=
0/tutorials/__<u></u>newPublication14.html#N100C5</a><div class=3D"im"><br>
=A0 =A0 &lt;<a href=3D"http://lenya.apache.org/docu20/tutorials/newPublicat=
ion14.html#N100C5" target=3D"_blank">http://lenya.apache.org/<u></u>docu20/=
tutorials/<u></u>newPublication14.html#N100C5</a>&gt;<br>
<br>
=A0 =A0 Basically, instead of using the path<br>
<br></div>
=A0 =A0 =A0 =A0lenya/pubs/$MYPUB/work/lucene/<u></u>__index<div class=3D"im=
"><br>
<br>
=A0 =A0 you could use something like<br>
<br>
=A0 =A0 =A0 =A0/var/lenya/lucene/index<br>
<br>
=A0 =A0 I would recommend to store all data (content, access control data,<=
br>
=A0 =A0 search index) outside the web application directory anyways.<br>
<br>
=A0 =A0 HTH,<br>
=A0 =A0 -- Andreas<br>
<br>
=A0 =A0 --<br>
=A0 =A0 Andreas Hartmann, CTO<br>
=A0 =A0 BeCompany GmbH<br>
=A0 =A0 <a href=3D"http://www.becompany.ch" target=3D"_blank">http://www.be=
company.ch</a><br></div>
=A0 =A0 Tel.: <a href=3D"tel:%2B41%20%280%29%2043%20818%2057%2001" value=3D=
"+41438185701" target=3D"_blank">+41 (0) 43 818 57 01</a> &lt;tel:%2B41%20%=
280%29%2043%<u></u>20818%2057%2001&gt;<br>
<br>
<br>
=A0 =A0 ------------------------------<u></u>__----------------------------=
<u></u>--__---------<br>
=A0 =A0 To unsubscribe, e-mail: [email protected].<u></u>__org<=
br>
=A0 =A0 &lt;mailto:<a href=3D"mailto:[email protected]" tar=
get=3D"_blank">user-unsubscribe@<u></u>lenya.apache.org</a>&gt;<div class=
=3D"im"><br>
=A0 =A0 For additional commands, e-mail: <a href=3D"mailto:user-help@lenya.=
apache.org" target=3D"_blank">[email protected]</a><br></div>
=A0 =A0 &lt;mailto:<a href=3D"mailto:[email protected]" target=3D"=
_blank">user-help@lenya.<u></u>apache.org</a>&gt;<br>
<br>
<br>
</blockquote><div class=3D"HOEnZb"><div class=3D"h5">
<br>
<br>
------------------------------<u></u>------------------------------<u></u>-=
--------<br>
To unsubscribe, e-mail: <a href=3D"mailto:[email protected]=
" target=3D"_blank">[email protected].<u></u>org</a><br>
For additional commands, e-mail: <a href=3D"mailto:[email protected]=
rg" target=3D"_blank">[email protected]</a><br>
<br>
</div></div></blockquote></div><br></div>

--f46d0438904d272c4c04d33fc8b3--