Re: Solr Exception: Undefined Field

2018-01-18 Thread Deepak Goel
Hello

In Solr Admin: I type the q parameter as -

text_entry:*

It gives the following exception (In the schema I do see a field as text_entry):

{
"responseHeader":{
"zkConnected":true,
"status":400,
"QTime":2,
"params":{
"q":"text_entry:*",
"_":"1516190134181"}},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","org.apache.solr.common.SolrException"],
"msg":"undefined field text_entry",
"code":400}}


However when i type the q paramter as -

{!term f=text_entry}henry

This does give out the output as foll:

{
"responseHeader":{
"zkConnected":true,
"status":0,
"QTime":0,
"params":{
"q":"{!term f=text_entry}henry",
"_":"1516190134181"}},
"response":{"numFound":262,"start":0,"docs":[
{
"type":"line",
"line_id":"80075",
"play_name":"Richard II",
"speech_number":"13",
"line_number":"3.3.37",
"speaker":"HENRY BOLINGBROKE",
"text_entry":"Henry Bolingbroke",
"id":"9428c765-a4e8-4116-937a-9b70e8a8e2de",
"_version_":1588569205789163522,
"speaker_str":["HENRY BOLINGBROKE"],
"text_entry_str":["Henry Bolingbroke"],
"line_number_str":["3.3.37"],
"type_str":["line"],
"play_name_str":["Richard II"]},
{


Any ideas what is going wrong in the first q?

Thank You

On 1/18/18, Rick Leir  wrote:
> Deepak
> Would you like to write your post again without asterisks? Include the
> asterisks which are necessary to the query of course.
> Rick
>
> On January 17, 2018 1:10:28 PM EST, Deepak Goel  wrote:
>>*Hello*
>>
>>*In Solr Admin: I type the q parameter as - *
>>
>>*text_entry:**
>>
>>*It gives the following exception (In the schema I do see a field as
>>text_entry):*
>>
>>{ "responseHeader":{ "zkConnected":true, "status":400, "QTime":2,
>>"params":{
>>"q":"text_entry:*", "_":"1516190134181"}}, "error":{ "metadata":[
>>"error-class","org.apache.solr.common.SolrException",
>>"root-error-class",
>>"org.apache.solr.common.SolrException"], "msg":"undefined field
>>text_entry",
>>"code":400}}
>>
>>
>>*However when i type the q paramter as -*
>>
>>*{!term f=text_entry}henry*
>>
>>*This does give out the output as foll:*
>>
>>{ "responseHeader":{ "zkConnected":true, "status":0, "QTime":0,
>>"params":{ "
>>q":"{!term f=text_entry}henry", "_":"1516190134181"}},
>>"response":{"numFound
>>":262,"start":0,"docs":[ { "type":"line", "line_id":"80075",
>>"play_name":"Richard
>>II", "speech_number":"13", "line_number":"3.3.37", "speaker":"HENRY
>>BOLINGBROKE", "text_entry":"Henry Bolingbroke", "id":
>>"9428c765-a4e8-4116-937a-9b70e8a8e2de",
>>"_version_":1588569205789163522, "
>>speaker_str":["HENRY BOLINGBROKE"], "text_entry_str":["Henry
>>Bolingbroke"],
>>"line_number_str":["3.3.37"], "type_str":["line"],
>>"play_name_str":["Richard
>>II"]}, {
>>**
>>
>>Any ideas what is going wrong in the first q?
>>
>>Thank You
>>
>>Deepak
>>"Please stop cruelty to Animals, help by becoming a Vegan"
>>+91 73500 12833
>>deic...@gmail.com
>>
>>Facebook: https://www.facebook.com/deicool
>>LinkedIn: www.linkedin.com/in/deicool
>>
>>"Plant a Tree, Go Green"
>>
>>
>>Virus-free.
>>www.avg.com
>>
>><#m_-480358672325756571_m_-3347175065213108175_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> --
> Sorry for being brief. Alternate email is rickleir at yahoo dot com
> --
> Sorry for being brief. Alternate email is rickleir at yahoo dot com


-- 


Deepak
"Please stop cruelty to Animals, help by becoming a Vegan"
+91 73500 12833
deic...@gmail.com

Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool

"Plant a Tree, Go Green"


Re: Solr Exception: Undefined Field

2018-01-18 Thread Atita Arora
Hi Deepak,

I am wondering if we can take a look at your schema and if you can tell
which version of solr are you on,would help us to debug and recreate issue
at our local box.

Atita


On Jan 18, 2018 1:44 PM, "Deepak Goel"  wrote:

> Hello
>
> In Solr Admin: I type the q parameter as -
>
> text_entry:*
>
> It gives the following exception (In the schema I do see a field as
> text_entry):
>
> {
> "responseHeader":{
> "zkConnected":true,
> "status":400,
> "QTime":2,
> "params":{
> "q":"text_entry:*",
> "_":"1516190134181"}},
> "error":{
> "metadata":[
> "error-class","org.apache.solr.common.SolrException",
> "root-error-class","org.apache.solr.common.SolrException"],
> "msg":"undefined field text_entry",
> "code":400}}
>
>
> However when i type the q paramter as -
>
> {!term f=text_entry}henry
>
> This does give out the output as foll:
>
> {
> "responseHeader":{
> "zkConnected":true,
> "status":0,
> "QTime":0,
> "params":{
> "q":"{!term f=text_entry}henry",
> "_":"1516190134181"}},
> "response":{"numFound":262,"start":0,"docs":[
> {
> "type":"line",
> "line_id":"80075",
> "play_name":"Richard II",
> "speech_number":"13",
> "line_number":"3.3.37",
> "speaker":"HENRY BOLINGBROKE",
> "text_entry":"Henry Bolingbroke",
> "id":"9428c765-a4e8-4116-937a-9b70e8a8e2de",
> "_version_":1588569205789163522,
> "speaker_str":["HENRY BOLINGBROKE"],
> "text_entry_str":["Henry Bolingbroke"],
> "line_number_str":["3.3.37"],
> "type_str":["line"],
> "play_name_str":["Richard II"]},
> {
> 
>
> Any ideas what is going wrong in the first q?
>
> Thank You
>
> On 1/18/18, Rick Leir  wrote:
> > Deepak
> > Would you like to write your post again without asterisks? Include the
> > asterisks which are necessary to the query of course.
> > Rick
> >
> > On January 17, 2018 1:10:28 PM EST, Deepak Goel 
> wrote:
> >>*Hello*
> >>
> >>*In Solr Admin: I type the q parameter as - *
> >>
> >>*text_entry:**
> >>
> >>*It gives the following exception (In the schema I do see a field as
> >>text_entry):*
> >>
> >>{ "responseHeader":{ "zkConnected":true, "status":400, "QTime":2,
> >>"params":{
> >>"q":"text_entry:*", "_":"1516190134181"}}, "error":{ "metadata":[
> >>"error-class","org.apache.solr.common.SolrException",
> >>"root-error-class",
> >>"org.apache.solr.common.SolrException"], "msg":"undefined field
> >>text_entry",
> >>"code":400}}
> >>
> >>
> >>*However when i type the q paramter as -*
> >>
> >>*{!term f=text_entry}henry*
> >>
> >>*This does give out the output as foll:*
> >>
> >>{ "responseHeader":{ "zkConnected":true, "status":0, "QTime":0,
> >>"params":{ "
> >>q":"{!term f=text_entry}henry", "_":"1516190134181"}},
> >>"response":{"numFound
> >>":262,"start":0,"docs":[ { "type":"line", "line_id":"80075",
> >>"play_name":"Richard
> >>II", "speech_number":"13", "line_number":"3.3.37", "speaker":"HENRY
> >>BOLINGBROKE", "text_entry":"Henry Bolingbroke", "id":
> >>"9428c765-a4e8-4116-937a-9b70e8a8e2de",
> >>"_version_":1588569205789163522, "
> >>speaker_str":["HENRY BOLINGBROKE"], "text_entry_str":["Henry
> >>Bolingbroke"],
> >>"line_number_str":["3.3.37"], "type_str":["line"],
> >>"play_name_str":["Richard
> >>II"]}, {
> >>**
> >>
> >>Any ideas what is going wrong in the first q?
> >>
> >>Thank You
> >>
> >>Deepak
> >>"Please stop cruelty to Animals, help by becoming a Vegan"
> >>+91 73500 12833
> >>deic...@gmail.com
> >>
> >>Facebook: https://www.facebook.com/deicool
> >>LinkedIn: www.linkedin.com/in/deicool
> >>
> >>"Plant a Tree, Go Green"
> >>
> >> source=link&utm_campaign=sig-email&utm_content=webmail>
> >>Virus-free.
> >>www.avg.com
> >> source=link&utm_campaign=sig-email&utm_content=webmail>
> >><#m_-480358672325756571_m_-3347175065213108175_DAB4FAD8-2D
> D7-40BB-A1B8-4E2AA1F9FDF2>
> >
> > --
> > Sorry for being brief. Alternate email is rickleir at yahoo dot com
> > --
> > Sorry for being brief. Alternate email is rickleir at yahoo dot com
>
>
> --
>
>
> Deepak
> "Please stop cruelty to Animals, help by becoming a Vegan"
> +91 73500 12833
> deic...@gmail.com
>
> Facebook: https://www.facebook.com/deicool
> LinkedIn: www.linkedin.com/in/deicool
>
> "Plant a Tree, Go Green"
>


SOLR Data Backup

2018-01-18 Thread Wael Kader
Hello,

Whats the best way to do a backup of the SOLR data.
I have a single node solr server and I want to always keep a copy of the
data I have.

Is replication an option for what I want ?

I would like to get some tutorials and papers if possible on the method
that should be used in case its backup or replication or anything else.

-- 
Regards,
Wael


Re: SOLR Data Backup

2018-01-18 Thread Charlie Hull

On 18/01/2018 09:21, Wael Kader wrote:

Hello,

Whats the best way to do a backup of the SOLR data.
I have a single node solr server and I want to always keep a copy of the
data I have.

Is replication an option for what I want ?

I would like to get some tutorials and papers if possible on the method
that should be used in case its backup or replication or anything else.



Hi Wael,

Have you considered backing up the source data instead? You can always 
re-index to re-create the Solr data.


Replication will certainly allow you to maintain a copy of the Solr 
data, either so you can handle more search traffic by load balancing 
between the two, or to provide a failover capability in the case of a 
server failure. But this isn't a backup in the traditional sense. You 
shouldn't consider Solr as your 'source of truth' unless for some reason 
it is impossible to re-index.


Perhaps if you could let us know why you think you need a backup we can 
suggest the best solution.


Cheers

Charlie

--
Charlie Hull
Flax - Open Source Enterprise Search

tel/fax: +44 (0)8700 118334
mobile:  +44 (0)7767 825828
web: www.flax.co.uk


Re: SOLR Data Backup

2018-01-18 Thread Emir Arnautović
Hi Weal,
If you want HA and FT you have to have at least two Solr nodes and 3 zookeeper 
nodes (if you plan on using SolrCloud).

If you want just to be sure you don’t have to reindex your data in case 
something goes wrong, you can use Solr backup feature: 
https://lucene.apache.org/solr/guide/6_6/making-and-restoring-backups.html 


HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 18 Jan 2018, at 10:21, Wael Kader  wrote:
> 
> Hello,
> 
> Whats the best way to do a backup of the SOLR data.
> I have a single node solr server and I want to always keep a copy of the
> data I have.
> 
> Is replication an option for what I want ?
> 
> I would like to get some tutorials and papers if possible on the method
> that should be used in case its backup or replication or anything else.
> 
> -- 
> Regards,
> Wael



Re: SOLR Data Backup

2018-01-18 Thread Wael Kader
Hi,

Its not possible for me to re-index the data in some of my indexes is only
saved in SOLR.
I need this solution to make sure that in case the live index fails, I can
move to the backup or replicated index.

Thanks,
Wael

On Thu, Jan 18, 2018 at 11:41 AM, Charlie Hull  wrote:

> On 18/01/2018 09:21, Wael Kader wrote:
>
>> Hello,
>>
>> Whats the best way to do a backup of the SOLR data.
>> I have a single node solr server and I want to always keep a copy of the
>> data I have.
>>
>> Is replication an option for what I want ?
>>
>> I would like to get some tutorials and papers if possible on the method
>> that should be used in case its backup or replication or anything else.
>>
>>
> Hi Wael,
>
> Have you considered backing up the source data instead? You can always
> re-index to re-create the Solr data.
>
> Replication will certainly allow you to maintain a copy of the Solr data,
> either so you can handle more search traffic by load balancing between the
> two, or to provide a failover capability in the case of a server failure.
> But this isn't a backup in the traditional sense. You shouldn't consider
> Solr as your 'source of truth' unless for some reason it is impossible to
> re-index.
>
> Perhaps if you could let us know why you think you need a backup we can
> suggest the best solution.
>
> Cheers
>
> Charlie
>
> --
> Charlie Hull
> Flax - Open Source Enterprise Search
>
> tel/fax: +44 (0)8700 118334
> mobile:  +44 (0)7767 825828
> web: www.flax.co.uk
>



-- 
Regards,
Wael


Re: SOLR Data Backup

2018-01-18 Thread Emir Arnautović
Hi Weal,
In general, it is not recommended to use Solr as a primary storage so it is 
better to store your data somewhere else. That will allow you o reindex if 
needed and also allow you to not store some field in index and make it more 
efficient.
When it comes to your original question, it seems that backup/restore feature 
should be enough for you. If it is single node and static index, you can even 
do it manually - simply backup index folder, and when need to restore on some 
other place, create collection/core with same config, replace index folder with 
one that you backed up and reload collection/core.

Regards,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 18 Jan 2018, at 11:06, Wael Kader  wrote:
> 
> Hi,
> 
> Its not possible for me to re-index the data in some of my indexes is only
> saved in SOLR.
> I need this solution to make sure that in case the live index fails, I can
> move to the backup or replicated index.
> 
> Thanks,
> Wael
> 
> On Thu, Jan 18, 2018 at 11:41 AM, Charlie Hull  wrote:
> 
>> On 18/01/2018 09:21, Wael Kader wrote:
>> 
>>> Hello,
>>> 
>>> Whats the best way to do a backup of the SOLR data.
>>> I have a single node solr server and I want to always keep a copy of the
>>> data I have.
>>> 
>>> Is replication an option for what I want ?
>>> 
>>> I would like to get some tutorials and papers if possible on the method
>>> that should be used in case its backup or replication or anything else.
>>> 
>>> 
>> Hi Wael,
>> 
>> Have you considered backing up the source data instead? You can always
>> re-index to re-create the Solr data.
>> 
>> Replication will certainly allow you to maintain a copy of the Solr data,
>> either so you can handle more search traffic by load balancing between the
>> two, or to provide a failover capability in the case of a server failure.
>> But this isn't a backup in the traditional sense. You shouldn't consider
>> Solr as your 'source of truth' unless for some reason it is impossible to
>> re-index.
>> 
>> Perhaps if you could let us know why you think you need a backup we can
>> suggest the best solution.
>> 
>> Cheers
>> 
>> Charlie
>> 
>> --
>> Charlie Hull
>> Flax - Open Source Enterprise Search
>> 
>> tel/fax: +44 (0)8700 118334
>> mobile:  +44 (0)7767 825828
>> web: www.flax.co.uk
>> 
> 
> 
> 
> -- 
> Regards,
> Wael



Re: SOLR Data Backup

2018-01-18 Thread Charlie Hull

On 18/01/2018 10:06, Wael Kader wrote:

Hi,

Its not possible for me to re-index the data in some of my indexes is only
saved in SOLR.
I need this solution to make sure that in case the live index fails, I can
move to the backup or replicated index.


OK, so now it's down to you to decide whether you want the backup index 
immediately available for transparent failover, in which case Solr Cloud 
is probably the way to go, or use what Emir recommends to regularly 
create an offline backup you can restore from (bearing in mind this may 
not be *totally* up to date in case of a failure and restoration may 
take a while).


Charlie


Thanks,
Wael

On Thu, Jan 18, 2018 at 11:41 AM, Charlie Hull  wrote:


On 18/01/2018 09:21, Wael Kader wrote:


Hello,

Whats the best way to do a backup of the SOLR data.
I have a single node solr server and I want to always keep a copy of the
data I have.

Is replication an option for what I want ?

I would like to get some tutorials and papers if possible on the method
that should be used in case its backup or replication or anything else.



Hi Wael,

Have you considered backing up the source data instead? You can always
re-index to re-create the Solr data.

Replication will certainly allow you to maintain a copy of the Solr data,
either so you can handle more search traffic by load balancing between the
two, or to provide a failover capability in the case of a server failure.
But this isn't a backup in the traditional sense. You shouldn't consider
Solr as your 'source of truth' unless for some reason it is impossible to
re-index.

Perhaps if you could let us know why you think you need a backup we can
suggest the best solution.

Cheers

Charlie

--
Charlie Hull
Flax - Open Source Enterprise Search

tel/fax: +44 (0)8700 118334
mobile:  +44 (0)7767 825828
web: www.flax.co.uk








--
Charlie Hull
Flax - Open Source Enterprise Search

tel/fax: +44 (0)8700 118334
mobile:  +44 (0)7767 825828
web: www.flax.co.uk


Re: SOLR Data Backup

2018-01-18 Thread Wael Kader
Hi,

The data is always changing for me so I think I can try the replication
option.
I am using cloudera and the data is saved in HDFS. Is it possible for me to
move the data while the index is running without any problems ?

I would also like to know if its possible to setup slave/master replication
without rebuilding the index.

Thanks,
Wael

On Thu, Jan 18, 2018 at 12:06 PM, Wael Kader  wrote:

> Hi,
>
> Its not possible for me to re-index the data in some of my indexes is only
> saved in SOLR.
> I need this solution to make sure that in case the live index fails, I can
> move to the backup or replicated index.
>
> Thanks,
> Wael
>
> On Thu, Jan 18, 2018 at 11:41 AM, Charlie Hull  wrote:
>
>> On 18/01/2018 09:21, Wael Kader wrote:
>>
>>> Hello,
>>>
>>> Whats the best way to do a backup of the SOLR data.
>>> I have a single node solr server and I want to always keep a copy of the
>>> data I have.
>>>
>>> Is replication an option for what I want ?
>>>
>>> I would like to get some tutorials and papers if possible on the method
>>> that should be used in case its backup or replication or anything else.
>>>
>>>
>> Hi Wael,
>>
>> Have you considered backing up the source data instead? You can always
>> re-index to re-create the Solr data.
>>
>> Replication will certainly allow you to maintain a copy of the Solr data,
>> either so you can handle more search traffic by load balancing between the
>> two, or to provide a failover capability in the case of a server failure.
>> But this isn't a backup in the traditional sense. You shouldn't consider
>> Solr as your 'source of truth' unless for some reason it is impossible to
>> re-index.
>>
>> Perhaps if you could let us know why you think you need a backup we can
>> suggest the best solution.
>>
>> Cheers
>>
>> Charlie
>>
>> --
>> Charlie Hull
>> Flax - Open Source Enterprise Search
>>
>> tel/fax: +44 (0)8700 118334
>> mobile:  +44 (0)7767 825828
>> web: www.flax.co.uk
>>
>
>
>
> --
> Regards,
> Wael
>



-- 
Regards,
Wael


Re: SOLR Data Backup

2018-01-18 Thread Emir Arnautović
Hi Wael,
I am not sure about moving data in HDFS but you should be able to set up slave 
without reindexing. Did you start the first node in standalone mode?
You need to check if replication handler is enabled (should be by default) and 
set up slave to pull data from the first node. Note that slave should be placed 
on a separate host.
If you are using HDFS for storing your index and if you can tolerate some 
downtime, isn’t that enough to satisfy your FT requirement? In master-slave 
setup you still have SPOF - master node - if it goes out, updates will stop.

Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 18 Jan 2018, at 11:20, Wael Kader  wrote:
> 
> Hi,
> 
> The data is always changing for me so I think I can try the replication
> option.
> I am using cloudera and the data is saved in HDFS. Is it possible for me to
> move the data while the index is running without any problems ?
> 
> I would also like to know if its possible to setup slave/master replication
> without rebuilding the index.
> 
> Thanks,
> Wael
> 
> On Thu, Jan 18, 2018 at 12:06 PM, Wael Kader  wrote:
> 
>> Hi,
>> 
>> Its not possible for me to re-index the data in some of my indexes is only
>> saved in SOLR.
>> I need this solution to make sure that in case the live index fails, I can
>> move to the backup or replicated index.
>> 
>> Thanks,
>> Wael
>> 
>> On Thu, Jan 18, 2018 at 11:41 AM, Charlie Hull  wrote:
>> 
>>> On 18/01/2018 09:21, Wael Kader wrote:
>>> 
 Hello,
 
 Whats the best way to do a backup of the SOLR data.
 I have a single node solr server and I want to always keep a copy of the
 data I have.
 
 Is replication an option for what I want ?
 
 I would like to get some tutorials and papers if possible on the method
 that should be used in case its backup or replication or anything else.
 
 
>>> Hi Wael,
>>> 
>>> Have you considered backing up the source data instead? You can always
>>> re-index to re-create the Solr data.
>>> 
>>> Replication will certainly allow you to maintain a copy of the Solr data,
>>> either so you can handle more search traffic by load balancing between the
>>> two, or to provide a failover capability in the case of a server failure.
>>> But this isn't a backup in the traditional sense. You shouldn't consider
>>> Solr as your 'source of truth' unless for some reason it is impossible to
>>> re-index.
>>> 
>>> Perhaps if you could let us know why you think you need a backup we can
>>> suggest the best solution.
>>> 
>>> Cheers
>>> 
>>> Charlie
>>> 
>>> --
>>> Charlie Hull
>>> Flax - Open Source Enterprise Search
>>> 
>>> tel/fax: +44 (0)8700 118334
>>> mobile:  +44 (0)7767 825828
>>> web: www.flax.co.uk
>>> 
>> 
>> 
>> 
>> --
>> Regards,
>> Wael
>> 
> 
> 
> 
> -- 
> Regards,
> Wael



Re: SOLR Data Backup

2018-01-18 Thread Florian Gleixner
Am 18.01.2018 um 10:21 schrieb Wael Kader:
> Hello,
> 
> Whats the best way to do a backup of the SOLR data.
> I have a single node solr server and I want to always keep a copy of the
> data I have.
> 
> Is replication an option for what I want ?
> 
> I would like to get some tutorials and papers if possible on the method
> that should be used in case its backup or replication or anything else.
> 

The reference manual will help you:


https://lucene.apache.org/solr/guide/6_6/making-and-restoring-backups.html#standalone-mode-backups



signature.asc
Description: OpenPGP digital signature


Simple string comparison by SOLR function

2018-01-18 Thread Dariusz Wojtas
Hi,

I am using LTR, and writing custom features.
What I want to do, is conditional calculation, based on string comparison.
Something like
  if ($gender == 'test') {
calculation 1 (for test just return 0)
  } else {
calculation 2 (for test just return 1)
  }

'gender' is param passed in the user query, for test purposes below it is
given value '*'.
Different variants of what I am trying to do

1){!func}if(\"${gender}\"==\"test\",0,1)
Exception: org.apache.solr.search.SyntaxError: Expected ',' at position 6
in 'if("*"=="test",0,1)'

2){!func}if('${gender}'=='test',0,1)
Exception: org.apache.solr.search.SyntaxError: Expected ',' at position 6
in 'if('*'=='test',0,1)'

3){!func}if(eq(${gender},'test'),0,1)
Exception: java.lang.UnsupportedOperationException
at
org.apache.lucene.queries.function.FunctionValues.doubleVal(FunctionValues.java:49)
at
org.apache.solr.search.function.SolrComparisonBoolFunction.compare(SolrComparisonBoolFunction.java:55)
at
org.apache.lucene.queries.function.valuesource.ComparisonBoolFunction$1.boolVal(ComparisonBoolFunction.java:61)


Any hint how to achieve this?

Best regards,
Dariusz Wojtas


Re: Need help with solr highlighting feature

2018-01-18 Thread Steve Rowe
Hi Aashish,

Thanks for letting us know.

--
Steve
www.lucidworks.com

> On Jan 17, 2018, at 1:41 PM, Aashish Agarwal  wrote:
> 
> Hello Steve,
> 
> Sorry to disturb, the issue was due to custom tokenizer that I used. Since
> that was not storing offset so term vector was not working.
> Its resolved now.
> 
> On Jan 17, 2018 11:06 PM, "Steve Rowe"  wrote:
> 
>> Hi Aashish,
>> 
>> Which version of Solr are you using?
>> 
>> Please share your configuration: highlighter and schema.
>> 
>> --
>> Steve
>> www.lucidworks.com
>> 
>>> On Jan 16, 2018, at 12:20 PM, Aashish Agarwal 
>> wrote:
>>> 
>>> Hello,
>>> 
>>> I am using solr highlighting feature on multivalued field containing
>> korean
>>> words.The feature is not working as expected. Search is working fine but
>> in
>>> case of highlighting it gives response as .
>>> 
>>> I am storing term vector for the field and it is also stored=true.
>>> 
>>> Please reply soon. Need this feature working urgently.
>>> 
>>> Thanks,
>>> Aashish
>> 
>> 



Documentation Slop (DisMax parser)

2018-01-18 Thread James
Hi:

 

There seems to be an error in the documentation about the slop parameter ps
used by the eDisMax parser. It reads:

 

 

"This means that if the terms "foo" and "bar" appear in the document with
less than 10 terms between each

other, the phrase will match."

 

 

Counterexample:

"Foo one two three four five fix seven eight nine bar" will not match with
ps=10

 

It seems that it must be "less than 9".

 

 

However, when more query terms are used it gets complicated when one tries
to count words in between.

 

 

Easier to understand (and correct according to my testing) would be
something like:

 

"This means that if the terms "foo" and "bar" appear in the document within
a group of 10 or less terms, the phrase will match. For example the doc that
says:

*Foo* term1 term2 term3 *bar*

will match the phrase query. A document that says

*Foo* term1 term2 term3 term4 term5 term6 term7 term8 term9 *bar* 

will not (because the search terms are within a group of 11 terms).

Note: If any search term is a MUST-NOT term, the phrase slop query will
never match.

"

 

 

Anybody willing to review and change to documentation?

 

Thanks,

James

 

 



Frequently Used Search Terms.

2018-01-18 Thread Fiz Newyorker
Hi Team,

I am using Solr 6.5, I want to retrieve the Information on the Frequently
Searched Terms and User Clicks , Is there way to Store these information
and Stats ? Where does the Lucene/Solr stores this Information.

Is there way to retrieve this information .

I want to use this information as an input to Search Relevancy.

Please share your thoughts .



Thanks
Fiz..


Re: Doubts regarding usage of block join query

2018-01-18 Thread Mikhail Khludnev
Just find a way how to write a block into a segment as whole via
https://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/IndexWriter.html#addDocuments(java.lang.Iterable,
org.apache.lucene.analysis.Analyzer).

On Thu, Jan 18, 2018 at 8:24 AM, Aashish Agarwal 
wrote:

> So is there any way to solve the above problem?
>
> On Jan 18, 2018 1:31 AM, "Mikhail Khludnev"  wrote:
>
> > sure
> >
> > On Wed, Jan 17, 2018 at 9:39 PM, Aashish Agarwal 
> > wrote:
> >
> > > Hello,
> > > I tried to use block join query feature in solr 4.6.0. My data is in
> > > database but since 4.6 does not support DIH with child=true, so I
> created
> > > the csv in order list of child followed by parent.
> > > I used the csv to import data as described in
> > > https://gist.github.com/mkhludnev/6406734#file-t-shirts-xml
> > > So, _root_ value is created by me not internally by solr. Would that
> > > create a problem.
> > >
> > > Please help.
> > >
> > > Thanks,
> > > Aashish
> > >
> >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> >
>



-- 
Sincerely yours
Mikhail Khludnev


Re:Frequently Used Search Terms.

2018-01-18 Thread Diego Ceccarelli (BLOOMBERG/ LONDON)
Hi Fiz,

It is not possible at the moment, you will have to log the queries (from solr, 
or before you sent them) and use external tools to do that. 

There is a jira item on that if you are interested: 
https://issues.apache.org/jira/browse/SOLR-10359

Diego

From: solr-user@lucene.apache.org At: 01/18/18 18:16:55To:  
fiznewy...@gmail.com,  solr-user@lucene.apache.org
Subject: Frequently Used Search Terms.

Hi Team,

I am using Solr 6.5, I want to retrieve the Information on the Frequently
Searched Terms and User Clicks , Is there way to Store these information
and Stats ? Where does the Lucene/Solr stores this Information.

Is there way to retrieve this information .

I want to use this information as an input to Search Relevancy.

Please share your thoughts .


Thanks
Fiz..




Re: Frequently Used Search Terms.

2018-01-18 Thread Sameer Maggon
I don't think you can get this information from Solr as it does not store
these. The stats component provides information around statistics, but it's
mostly numeric in nature. You could parse server logs for come up with a
way to build a Frequently Searched Terms (e.g. pump those logs in SiLK or
Kibana for visualization).

If you have the ability to change the front end and add some javascript
code to the UI or can intercept the search request and make an async or
batch calls to APIs for tracking, you can use SearchStax Analytics [1] that
provides Search Analytics that tracks searches, clicks, cart actions,
revenue, etc. There is also Sematext's product that offer Search Analytics
[2], however, I am not able to find that anymore on their website. @Otis?

Sameer
--
https://www.searchstax.com


[1] SearchStax Analytics - Documentation
https://www.searchstax.com/docs/search-analytics-start/

[2] Semetext Search Analytics -
https://sematext.com/blog/whats-new-in-sematext-search-analytics/



On Thu, Jan 18, 2018 at 10:16 AM, Fiz Newyorker 
wrote:

> Hi Team,
>
> I am using Solr 6.5, I want to retrieve the Information on the Frequently
> Searched Terms and User Clicks , Is there way to Store these information
> and Stats ? Where does the Lucene/Solr stores this Information.
>
> Is there way to retrieve this information .
>
> I want to use this information as an input to Search Relevancy.
>
> Please share your thoughts .
>
>
>
> Thanks
> Fiz..
>


Proximity search in spellcheck collation

2018-01-18 Thread Arnold Bronley
Hi,

Does Solr spellcheck collator consider proximity between words in
multi-word search phrase?

i.e. instead of returning spell suggestions by considering each individual
word separately, does it consider them in group if the words occur together
often?

E.g. bll gats should return bill gates instead of ball gate

Thanks


Re: Simple string comparison by SOLR function

2018-01-18 Thread Dariusz Wojtas
ok, I've found working solution using strdist(). If the result is less than
1.0 - these strings differ somehow.

{!func}if(lt(strdist(\"${gender}\",\"male\",edit),1),0,1)

this will let me go further with my logic.

Best regards,
Dariusz Wojtas


On Thu, Jan 18, 2018 at 3:43 PM, Dariusz Wojtas  wrote:

> Hi,
>
> I am using LTR, and writing custom features.
> What I want to do, is conditional calculation, based on string comparison.
> Something like
>   if ($gender == 'test') {
> calculation 1 (for test just return 0)
>   } else {
> calculation 2 (for test just return 1)
>   }
>
> 'gender' is param passed in the user query, for test purposes below it is
> given value '*'.
> Different variants of what I am trying to do
>
> 1){!func}if(\"${gender}\"==\"test\",0,1)
> Exception: org.apache.solr.search.SyntaxError: Expected ',' at position 6
> in 'if("*"=="test",0,1)'
>
> 2){!func}if('${gender}'=='test',0,1)
> Exception: org.apache.solr.search.SyntaxError: Expected ',' at position 6
> in 'if('*'=='test',0,1)'
>
> 3){!func}if(eq(${gender},'test'),0,1)
> Exception: java.lang.UnsupportedOperationException
> at org.apache.lucene.queries.function.FunctionValues.
> doubleVal(FunctionValues.java:49)
> at org.apache.solr.search.function.SolrComparisonBoolFunction.compare(
> SolrComparisonBoolFunction.java:55)
> at org.apache.lucene.queries.function.valuesource.
> ComparisonBoolFunction$1.boolVal(ComparisonBoolFunction.java:61)
>
>
> Any hint how to achieve this?
>
> Best regards,
> Dariusz Wojtas
>


Re: Documentation Slop (DisMax parser)

2018-01-18 Thread Jason Gerlowski
Hi James,

1. Good catch, and thanks for reporting it.
2. The improved wording you proposed above matches my (limited)
understanding.  Others might see something wrong that I missed, but I
think it's definitely an improvement over the current wording.
3. If you'd like, you can start the change yourself!  The
reference-guide documentation used to be much more "locked-down", but
now it lives in Asciidoc format alongside the Solr code.  Doc
bugs/improvements are handled through JIRA issues the same as any
other bugs would be.  If you're interested in opening a JIRA for this
and proposing your wording, you can get started using the instructions
here: https://wiki.apache.org/solr/HowToContribute.  Of course, if you
don't have the time or are uninterested in moving this along, I've got
a few minutes to upload a patch to JIRA on your behalf (though it
can't actually get merged without attention from a committer).

Best,

Jason

On Thu, Jan 18, 2018 at 6:29 AM, James  wrote:
> Hi:
>
>
>
> There seems to be an error in the documentation about the slop parameter ps
> used by the eDisMax parser. It reads:
>
>
>
>
>
> "This means that if the terms "foo" and "bar" appear in the document with
> less than 10 terms between each
>
> other, the phrase will match."
>
>
>
>
>
> Counterexample:
>
> "Foo one two three four five fix seven eight nine bar" will not match with
> ps=10
>
>
>
> It seems that it must be "less than 9".
>
>
>
>
>
> However, when more query terms are used it gets complicated when one tries
> to count words in between.
>
>
>
>
>
> Easier to understand (and correct according to my testing) would be
> something like:
>
>
>
> "This means that if the terms "foo" and "bar" appear in the document within
> a group of 10 or less terms, the phrase will match. For example the doc that
> says:
>
> *Foo* term1 term2 term3 *bar*
>
> will match the phrase query. A document that says
>
> *Foo* term1 term2 term3 term4 term5 term6 term7 term8 term9 *bar*
>
> will not (because the search terms are within a group of 11 terms).
>
> Note: If any search term is a MUST-NOT term, the phrase slop query will
> never match.
>
> "
>
>
>
>
>
> Anybody willing to review and change to documentation?
>
>
>
> Thanks,
>
> James
>
>
>
>
>


Re: Frequently Used Search Terms.

2018-01-18 Thread Emir Arnautović
Hi Fiz/Sameer,
Unfortunately, Sematext has discontinued SA when we released new version of our 
product. We hope to bring it back at one point.

Regards,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 18 Jan 2018, at 19:36, Sameer Maggon  wrote:
> 
> I don't think you can get this information from Solr as it does not store
> these. The stats component provides information around statistics, but it's
> mostly numeric in nature. You could parse server logs for come up with a
> way to build a Frequently Searched Terms (e.g. pump those logs in SiLK or
> Kibana for visualization).
> 
> If you have the ability to change the front end and add some javascript
> code to the UI or can intercept the search request and make an async or
> batch calls to APIs for tracking, you can use SearchStax Analytics [1] that
> provides Search Analytics that tracks searches, clicks, cart actions,
> revenue, etc. There is also Sematext's product that offer Search Analytics
> [2], however, I am not able to find that anymore on their website. @Otis?
> 
> Sameer
> --
> https://www.searchstax.com
> 
> 
> [1] SearchStax Analytics - Documentation
> https://www.searchstax.com/docs/search-analytics-start/
> 
> [2] Semetext Search Analytics -
> https://sematext.com/blog/whats-new-in-sematext-search-analytics/
> 
> 
> 
> On Thu, Jan 18, 2018 at 10:16 AM, Fiz Newyorker 
> wrote:
> 
>> Hi Team,
>> 
>> I am using Solr 6.5, I want to retrieve the Information on the Frequently
>> Searched Terms and User Clicks , Is there way to Store these information
>> and Stats ? Where does the Lucene/Solr stores this Information.
>> 
>> Is there way to retrieve this information .
>> 
>> I want to use this information as an input to Search Relevancy.
>> 
>> Please share your thoughts .
>> 
>> 
>> 
>> Thanks
>> Fiz..
>> 



Tesseract version in Solr 7.2

2018-01-18 Thread Zheng Lin Edwin Yeo
Hi,

What is the Tesseract OCR version that comes with Solr 7.2.0?

I can't manage to locate the information in the documentation.

Thanks.

Regards,
Edwin


Preserve order during indexing

2018-01-18 Thread Aashish Agarwal
Hi,

I need to index documents in solr so that they are stored in same order as
present in database. i.e *:* gives result in db order. Is it possible.

Thanks,
Aashish


Re: Preserve order during indexing

2018-01-18 Thread jagdish vasani
Hi Ashish,
I think it's not possible,solr creates  inverted index.. but you can get
documents by sorting orders, give sort= asc/desc.

Thanks,
JagdishVasani
On 19-Jan-2018 9:22 am, "Aashish Agarwal"  wrote:

> Hi,
>
> I need to index documents in solr so that they are stored in same order as
> present in database. i.e *:* gives result in db order. Is it possible.
>
> Thanks,
> Aashish
>


solr cluster: solr auto suggestion with requestHandler

2018-01-18 Thread Deepak Udapudi
Hi All,

Problem: Not able to build suggest data on all solr cluster nodes

Configured three solr using external zookeeper Configured the requestHandler 
for auto-suggestion as below



  true
  5
  Name


  suggest



  
  Name
  name
  name
  AnalyzingInfixLookupFactory
  name_suggester_infix_dir
  DocumentDictionaryFactory
  key
  lowercase
  name_suggestor_dictionary
  string
 


When we manually issue request with suggest.build=true on one of the node for 
building suggest data, suggest data is built for that particular node only, 
other nodes of cluster are not getting build the suggest data.
Any configuration mismatch?

Thanks a lot.

Thanks & Regards
Deepak

::DISCLAIMER::
--
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. E-mail transmission is not guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or may contain viruses in transmission. 
The e mail and its contents (with or without referred errors) shall therefore 
not attach any liability on the originator or HCL or its affiliates. Views or 
opinions, if any, presented in this email are solely those of the author and 
may not necessarily reflect the views or opinions of HCL or its affiliates. Any 
form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of this message without the prior written 
consent of authorized representative of HCL is strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any email and/or attachments, please check them for 
viruses and other defects.
--


The information contained in this email message and any attachments is 
confidential and intended only for the addressee(s). If you are not an 
addressee, you may not copy or disclose the information, or act upon it, and 
you should delete it entirely from your email system. Please notify the sender 
that you received this email in error.