You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "tomas.kalas [via Lucene]" <ml...@n3.nabble.com> on 2014/12/03 14:39:09 UTC

Alternative searching

Hello,
is possible searching by Solr search alternative words from some field?
For example if i want search some phrase from range:

At first position i want to have probably in one field hello,hi,cheerio.
At second my
At third name
At fourth is
At fifth Tomas, John, Paul.

And if i send query "My Tomas"~3 / "My John"~3 / "Hi Paul"~4 
So that always will find the required query.

Thanks.





______________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Alternative-searching-tp4172339.html
This email was sent by tomas.kalas (via Nabble)
To receive all replies by email, subscribe to this discussion: http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=4172339&code=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3JnfDQxNzIzMzl8MTIyNjQ0MTk0Mg==

Re: Alternative searching

Posted by Erick Erickson <er...@gmail.com>.
I'm guessing because your examples are not clear to me,
but assuming what you're really saying is that these are
all in the same doc and, for some reason you are unable to
just concatenate them all together before you send them
to Solr, you can use a multiValued field with positionIncrementgap
set to 1.

Then they'll all be in the same field in your doc.

If you're talking separate docs, that's another issue.

Best,
Erick

On Wed, Dec 3, 2014 at 6:43 AM, tomas.kalas <ka...@email.cz> wrote:
> I think something like that:
>
> First Position             Second Position             Third Position
> Fourth Position           Fift Position
> -------------           ----------------             --------------
> ----------------         -----------
> Hello                       My                                Name
> Is                              Paul
> Hi
> Tomas
> Cherio
> John
>
> And it is like one sentence, and i thinks so it don¨t bee in more docs.
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Alternative-searching-tp4172339p4172361.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: Alternative searching

Posted by "tomas.kalas" <ka...@email.cz>.
I think something like that:

First Position             Second Position             Third Position        
Fourth Position           Fift Position    
-------------           ----------------             --------------      
----------------         -----------
Hello                       My                                Name                  
Is                              Paul
Hi                                                                                                                        
Tomas
Cherio                                                                                                                   
John

And it is like one sentence, and i thinks so it don¨t bee in more docs. 




--
View this message in context: http://lucene.472066.n3.nabble.com/Alternative-searching-tp4172339p4172361.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Alternative searching

Posted by Ahmet Arslan <io...@yahoo.com.INVALID>.
Hi Tomas,

What do you mean by "get data into fields"? Do you mean indexing?

Following solr search URL will return all possible 9 documents.

q=someField:"(hello hi cheerio) my name is (Tomas John Paul)"&defType=complexphrase

for example,

doc1 = hello my name is Tomas
doc2 = hi my name is Paul
...
doc9 = cheerio my name is John.

Isn't that what you want?


On Wednesday, December 3, 2014 4:13 PM, tomas.kalas <ka...@email.cz> wrote:
Ok and how do you think how i get  data into to fields? And how it recognize
so how it is one term?



--
View this message in context: http://lucene.472066.n3.nabble.com/Alternative-searching-tp4172339p4172349.html

Sent from the Solr - User mailing list archive at Nabble.com.

 


On Wednesday, December 3, 2014 4:13 PM, tomas.kalas <ka...@email.cz> wrote:
Ok and how do you think how i get  data into to fields? And how it recognize
so how it is one term?



--
View this message in context: http://lucene.472066.n3.nabble.com/Alternative-searching-tp4172339p4172349.html

Sent from the Solr - User mailing list archive at Nabble.com.

Re: Alternative searching

Posted by "tomas.kalas" <ka...@email.cz>.
Ok and how do you think how i get  data into to fields? And how it recognize
so how it is one term?



--
View this message in context: http://lucene.472066.n3.nabble.com/Alternative-searching-tp4172339p4172349.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Alternative searching

Posted by Ahmet Arslan <io...@yahoo.com.INVALID>.
Hi Tomas,

I dont fully follow but, with ComplexPhraseQueryParser, you can use parenthesis inside phrases.

q="(hello hi cheerio) my name is (Tomas John Paul)"&defType=complexphrase

https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-ComplexPhraseQueryParser
Ahmet



On Wednesday, December 3, 2014 3:40 PM, tomas.kalas <ka...@email.cz> wrote:
Hello,
is possible searching by Solr search alternative words from some field?
For example if i want search some phrase from range:

At first position i want to have probably in one field hello,hi,cheerio.
At second my
At third name
At fourth is
At fifth Tomas, John, Paul.

And if i send query "My Tomas"~3 / "My John"~3 / "Hi Paul"~4 
So that always will find the required query.

Thanks.




--
View this message in context: http://lucene.472066.n3.nabble.com/Alternative-searching-tp4172339.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Alternative searching

Posted by "tomas.kalas" <ka...@email.cz>.
Its ok, when i use the example by synonym filter, so it wokrs, but i don´t
know how i have transfer this text to the schema.



--
View this message in context: http://lucene.472066.n3.nabble.com/Alternative-searching-tp4172339p4172356.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Alternative searching

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Have you looked at the synonyms token filter that is shipped in the
default example? Might be the first step.

Regards,
   Alex.
Personal: http://www.outerthoughts.com/ and @arafalov
Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
Solr popularizers community: https://www.linkedin.com/groups?gid=6713853


On 3 December 2014 at 08:39, tomas.kalas <ka...@email.cz> wrote:
> Hello,
> is possible searching by Solr search alternative words from some field?
> For example if i want search some phrase from range:
>
> At first position i want to have probably in one field hello,hi,cheerio.
> At second my
> At third name
> At fourth is
> At fifth Tomas, John, Paul.
>
> And if i send query "My Tomas"~3 / "My John"~3 / "Hi Paul"~4
> So that always will find the required query.
>
> Thanks.
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Alternative-searching-tp4172339.html
> Sent from the Solr - User mailing list archive at Nabble.com.