You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by Khalezis <al...@gmail.com> on 2014/07/10 12:08:33 UTC
Solr search space containing wildcard
Hello there,
Here's my problem I have several items in the base solr entitled as follows:
- Personal Tr
- Personal AnyCompany1
- Personal Company2
- Personal enterprise3
- AnyCompany1
- Company2
- enterprise3
- Guardian AnyCompany1
- Guardian Company2
- ...
I love that when I do a search for the terms "personal Entr" I did that
"personal Entr" and the following items:
- Personal AnyCompany1
- Personal Company2
- Personal enterprise3
and not the whole list.
But I do not know how. Any idea?
In advance, I thank you for your response.
cdt
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-space-containing-wildcard-tp4146495.html
Sent from the Lucene - General mailing list archive at Nabble.com.
Re: Solr search space containing wildcard
Posted by Khalezis <al...@gmail.com>.
Thank you for your answers, but the problem is still relevant here is the
query that I am sending to the server:
((criteriaAliases:( (personnels ac)^10 OR (personnels ac*)^5 )^4 ) OR
(groupHumanLabel:( (personnels ac)^10 OR (personnels ac*)^5 )^2 ) OR
(groupDescription:( (personnels ac)^10 OR (personnels ac*)^5 )^1 ))
Thx
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-space-containing-wildcard-tp4146495p4146693.html
Sent from the Lucene - General mailing list archive at Nabble.com.
Re: Solr search space containing wildcard
Posted by Mark Bennett <ma...@lucidworks.com>.
On Jul 10, 2014, at 8:49 AM, Khalezis <al...@gmail.com> wrote:
> To clarify my question : I would like to add a wild char like '*' (% for sql)
> at the end of my string, and find every data begining with this string
>
> For example, we could use " Select * from MyTable Where MyString LIKE
> 'Personnal C%' "
> Any idea on how to do this ?
Solr does support wildcard searching via the *
You're allowed to search for Personnal C*
But normally in Solr that would match both Personnal Cat and Cat Personnal
If you want it to match in that specific order there's additional things you might do.
Also, if you want automatic wildcards you can look at "edgy text"
>
> Thank you again for any answers
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-space-containing-wildcard-tp4146495p4146549.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
Re: Solr search space containing wildcard
Posted by Milica Bogicevic <an...@gmail.com>.
Hi Khalezis,
If I understand well your question, I think you should try to escape all
lucene special characters inside field value (except *) and replace all
spaces with "\ ".
For example, based on your SQL example, your query should look like:
http://localhost:8983/solr/select?q=<your_field_name>:(Personal\ C*)
This one should work.
Best,
Milica
On Thu, Jul 10, 2014 at 5:49 PM, Khalezis <al...@gmail.com> wrote:
> To clarify my question : I would like to add a wild char like '*' (% for
> sql)
> at the end of my string, and find every data begining with this string
>
> For example, we could use " Select * from MyTable Where MyString LIKE
> 'Personnal C%' "
> Any idea on how to do this ?
>
> Thank you again for any answers
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-search-space-containing-wildcard-tp4146495p4146549.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
>
Re: Solr search space containing wildcard
Posted by Khalezis <al...@gmail.com>.
To clarify my question : I would like to add a wild char like '*' (% for sql)
at the end of my string, and find every data begining with this string
For example, we could use " Select * from MyTable Where MyString LIKE
'Personnal C%' "
Any idea on how to do this ?
Thank you again for any answers
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-space-containing-wildcard-tp4146495p4146549.html
Sent from the Lucene - General mailing list archive at Nabble.com.
Re: Solr search space containing wildcard
Posted by Siva P Thumma <si...@gmail.com>.
His question was there should be more than 3 results.
It is even surprising to me that his list is containing more than 3 results
that match his query string.
-Siva P Thumma
On Thu, Jul 10, 2014 at 7:55 PM, Mark Bennett <ma...@lucidworks.com>
wrote:
> Hello Khalezis,
>
> The search term "personal" will match items with "Personal" because Lucene
> and Solr are typically case insensitive; terms are converted to lowercase
> at both index and search time.
>
> Was that your question? If not, maybe you can explain your question a bit
> more?
>
> --
> Mark Bennett / LucidWorks: Search & Big Data / mark.bennett@lucidworks.com
> Office: 408-898-4201 / Telecommute: 408-733-0387 / Cell: 408-829-6513
>
> On Jul 10, 2014, at 3:08 AM, Khalezis <al...@gmail.com> wrote:
>
> > Hello there,
> >
> > Here's my problem I have several items in the base solr entitled as
> follows:
> >
> > - Personal Tr
> > - Personal AnyCompany1
> > - Personal Company2
> > - Personal enterprise3
> > - AnyCompany1
> > - Company2
> > - enterprise3
> > - Guardian AnyCompany1
> > - Guardian Company2
> > - ...
> >
> > I love that when I do a search for the terms "personal Entr" I did that
> > "personal Entr" and the following items:
> >
> > - Personal AnyCompany1
> > - Personal Company2
> > - Personal enterprise3
> >
> > and not the whole list.
> >
> > But I do not know how. Any idea?
> >
> > In advance, I thank you for your response.
> >
> > cdt
> >
> >
> >
> > --
> > View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-search-space-containing-wildcard-tp4146495.html
> > Sent from the Lucene - General mailing list archive at Nabble.com.
>
>
Re: Solr search space containing wildcard
Posted by Mark Bennett <ma...@lucidworks.com>.
Hello Khalezis,
The search term "personal" will match items with "Personal" because Lucene and Solr are typically case insensitive; terms are converted to lowercase at both index and search time.
Was that your question? If not, maybe you can explain your question a bit more?
--
Mark Bennett / LucidWorks: Search & Big Data / mark.bennett@lucidworks.com
Office: 408-898-4201 / Telecommute: 408-733-0387 / Cell: 408-829-6513
On Jul 10, 2014, at 3:08 AM, Khalezis <al...@gmail.com> wrote:
> Hello there,
>
> Here's my problem I have several items in the base solr entitled as follows:
>
> - Personal Tr
> - Personal AnyCompany1
> - Personal Company2
> - Personal enterprise3
> - AnyCompany1
> - Company2
> - enterprise3
> - Guardian AnyCompany1
> - Guardian Company2
> - ...
>
> I love that when I do a search for the terms "personal Entr" I did that
> "personal Entr" and the following items:
>
> - Personal AnyCompany1
> - Personal Company2
> - Personal enterprise3
>
> and not the whole list.
>
> But I do not know how. Any idea?
>
> In advance, I thank you for your response.
>
> cdt
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-space-containing-wildcard-tp4146495.html
> Sent from the Lucene - General mailing list archive at Nabble.com.