Re: Function Query Parsing problem in Solr 5.4.1 and Solr 5.5.0

2016-04-02 Thread Max Bridgewater
Thank you Mike, that was it.

Max.

On Sat, Apr 2, 2016 at 2:40 AM, Mikhail Khludnev  wrote:

> Hello Max,
>
> Since it reports the first space occurrence pos=32, I advise to nuke all
> spaces between braces  in sum().
>
> On Fri, Apr 1, 2016 at 7:40 PM, Max Bridgewater  >
> wrote:
>
> > Hi,
> >
> > I have the following configuration for firstSearcher handler in
> > solrconfig.xml:
> >
> >
> >   
> >   
> > 
> >   parts
> >   score desc, Review1 asc, Rank2 asc
> > 
> > 
> >   make
> >   {!func}sum(product(0.01,param1),
> > product(0.20,param2),  min(param2,0.4)) desc
> > 
> >   
> > 
> >
> > This works great in Solr 4.10. However, in solr 5.4.1 and solr 5.5.0, I
> get
> > the below error. How do I write this kind of query with Solr 5?
> >
> >
> > Thanks,
> > Max.
> >
> >
> > ERROR org.apache.solr.handler.RequestHandlerBase  [   x:productsearch] –
> > org.apache.solr.common.SolrException: Can't determine a Sort Order (asc
> or
> > desc) in sort spec '{!func}sum(product(0.01,param1),
> product(0.20,param2),
> > min(param2,0.4)) desc', pos=32
> > at
> >
> >
> org.apache.solr.search.SortSpecParsing.parseSortSpec(SortSpecParsing.java:143)
> > at org.apache.solr.search.QParser.getSort(QParser.java:247)
> > at
> >
> >
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:18
> > 7)
> > at
> >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler
> > .java:247)
> > at
> >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.jav
> > a:156)
> > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2073)
> > at
> >
> >
> org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:6
> > 9)
> > at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1840)
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> 
> 
>


Re: most popular collate spellcheck

2016-04-02 Thread Reth RM
Afaik, such feature doesn't exist currently, but looks like nice to have.




On Thu, Mar 31, 2016 at 8:33 PM, michael solomon 
wrote:

> Hi,
> It's possible to return the most popular collate?
> i.e:
> spellcheck.q = prditive analytiycs
> spellcheck.maxCollations = 5
> spellcheck.count=0
> response:
> 
>   
>   false
>   
> positive analytic
> positive analytics
> predictive analytics
> primitive analytics
> punitive analytic
>   
> 
>
> I want that the collations will order by numFound. and obviesly that
> "predictive analytics" have more results from "positive analytic".
> Thanks,
> Michael
>


Reset JMX counters for monitoring without restarting

2016-04-02 Thread Jeff Courtade
Hi,

I am putting together some montitors for various things.

The counters seem to be  ... from the beginning of the process.

This makes many of them not so useful for long term monitoring and alerting.

Is there a way to rest the counters without restarting solr or reloading a
core?

For instance: these seem to be from the time the process started.

java -jar /opt/scripts/pkg/cmdline-jmxclient-0.10.3.jar - localhost:9010
solr/collection1:id=org.apache.solr.handler.component.SearchHandler,type=/select
$NAME

avgTimePerRequest.value  363.66010984870064
medianRequestTime.value  1240.416114498
75thPcRequestTime.value  1614.2324915
95thPcRequestTime.value  3048.37888109
99thPcRequestTime.value  5930.183086690001



--
Thanks,

Jeff Courtade
M: 240.507.6116


Re: Reset JMX counters for monitoring without restarting

2016-04-02 Thread Shawn Heisey
On 4/2/2016 11:06 AM, Jeff Courtade wrote:
> I am putting together some montitors for various things.
>
> The counters seem to be  ... from the beginning of the process.
>
> This makes many of them not so useful for long term monitoring and alerting.
>
> Is there a way to rest the counters without restarting solr or reloading a
> core?
>
> For instance: these seem to be from the time the process started.
>
> java -jar /opt/scripts/pkg/cmdline-jmxclient-0.10.3.jar - localhost:9010
> solr/collection1:id=org.apache.solr.handler.component.SearchHandler,type=/select
> $NAME
>
> avgTimePerRequest.value  363.66010984870064
> medianRequestTime.value  1240.416114498
> 75thPcRequestTime.value  1614.2324915
> 95thPcRequestTime.value  3048.37888109
> 99thPcRequestTime.value  5930.183086690001

Some of the information you find in statistics might indeed go back to
the last Solr start.

The specific stats that you have indicated are most useful over a long
period of time, ideally for the entire time Solr has been running, but
if you do want to reset them, you can do so with a core reload.  If
you're running cloud (doesn't look like you are), then you would reload
the whole collection, probably not the core.

Thanks,
Shawn



Re: most popular collate spellcheck

2016-04-02 Thread michael solomon
Thanks, and what we can do about that?
On Apr 2, 2016 5:28 PM, "Reth RM"  wrote:

> Afaik, such feature doesn't exist currently, but looks like nice to have.
>
>
>
>
> On Thu, Mar 31, 2016 at 8:33 PM, michael solomon 
> wrote:
>
> > Hi,
> > It's possible to return the most popular collate?
> > i.e:
> > spellcheck.q = prditive analytiycs
> > spellcheck.maxCollations = 5
> > spellcheck.count=0
> > response:
> > 
> >   
> >   false
> >   
> > positive analytic
> > positive analytics
> > predictive analytics
> > primitive analytics
> > punitive analytic
> >   
> > 
> >
> > I want that the collations will order by numFound. and obviesly that
> > "predictive analytics" have more results from "positive analytic".
> > Thanks,
> > Michael
> >
>


Re: Reset JMX counters for monitoring without restarting

2016-04-02 Thread Jeff Courtade
Thanks,

I was hoping there was a way without a core reload.

Do you know what is different with cloud? I need to do this in both.

Jeff Courtade
M: 240.507.6116
On Apr 2, 2016 1:37 PM, "Shawn Heisey"  wrote:

> On 4/2/2016 11:06 AM, Jeff Courtade wrote:
> > I am putting together some montitors for various things.
> >
> > The counters seem to be  ... from the beginning of the process.
> >
> > This makes many of them not so useful for long term monitoring and
> alerting.
> >
> > Is there a way to rest the counters without restarting solr or reloading
> a
> > core?
> >
> > For instance: these seem to be from the time the process started.
> >
> > java -jar /opt/scripts/pkg/cmdline-jmxclient-0.10.3.jar - localhost:9010
> >
> solr/collection1:id=org.apache.solr.handler.component.SearchHandler,type=/select
> > $NAME
> >
> > avgTimePerRequest.value  363.66010984870064
> > medianRequestTime.value  1240.416114498
> > 75thPcRequestTime.value  1614.2324915
> > 95thPcRequestTime.value  3048.37888109
> > 99thPcRequestTime.value  5930.183086690001
>
> Some of the information you find in statistics might indeed go back to
> the last Solr start.
>
> The specific stats that you have indicated are most useful over a long
> period of time, ideally for the entire time Solr has been running, but
> if you do want to reset them, you can do so with a core reload.  If
> you're running cloud (doesn't look like you are), then you would reload
> the whole collection, probably not the core.
>
> Thanks,
> Shawn
>
>


Problem building fuzzy suggestions

2016-04-02 Thread Fundera Developer

Hi all,

At present I am providing suggestions in my app with this configuration 
in my solrconfig.xml:


  

  mySuggester
  WFSTLookupFactory
  spellchk
  0.005
  true
  true

  
  

  true
  mySuggester
  5


   suggest

  


However, I would like to provide fuzzy suggestions, so that if the user 
types "managme", I can suggest "management". Based on the documentation 
I found on the wiki and googling, I tried with this configuration:


  

  mySuggester
  JaspellLookupFactory
  spellchk
  0.6
  true
  true

  


But if I start my Solr instance with that configuration, I get this 
error in the log:


   2016-04-02 18:24:26.018 ERROR (coreLoadExecutor-6-thread-1) [  
   x:funderatenders] o.a.s.c.CoreContainer Error creating core [myapp]:

   Error loading class 'JaspellLookupFactory'
   org.apache.solr.common.SolrException: Error loading class
   'JaspellLookupFactory'
at org.apache.solr.core.SolrCore.(SolrCore.java:820)
at org.apache.solr.core.SolrCore.(SolrCore.java:658)
at
   org.apache.solr.core.CoreContainer.create(CoreContainer.java:814)
at
   org.apache.solr.core.CoreContainer.access$000(CoreContainer.java:87)
at
   org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:467)
at
   org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
   
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:231)
at
   
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
   
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


What is the correct way to use and configure the JaspellLookupFactory, 
or where can I find documentation on it?


Thanks in advance!













Re: Reset JMX counters for monitoring without restarting

2016-04-02 Thread Otis Gospodnetić
Hi Jeff,

With info that Solr provides in JMX you have to keep track of things
yourself, do subtractions and counting yourself.
If you don't feel like reinventing that, see
https://sematext.com/spm/integrations/solr-monitoring/

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


On Sat, Apr 2, 2016 at 1:06 PM, Jeff Courtade 
wrote:

> Hi,
>
> I am putting together some montitors for various things.
>
> The counters seem to be  ... from the beginning of the process.
>
> This makes many of them not so useful for long term monitoring and
> alerting.
>
> Is there a way to rest the counters without restarting solr or reloading a
> core?
>
> For instance: these seem to be from the time the process started.
>
> java -jar /opt/scripts/pkg/cmdline-jmxclient-0.10.3.jar - localhost:9010
>
> solr/collection1:id=org.apache.solr.handler.component.SearchHandler,type=/select
> $NAME
>
> avgTimePerRequest.value  363.66010984870064
> medianRequestTime.value  1240.416114498
> 75thPcRequestTime.value  1614.2324915
> 95thPcRequestTime.value  3048.37888109
> 99thPcRequestTime.value  5930.183086690001
>
>
>
> --
> Thanks,
>
> Jeff Courtade
> M: 240.507.6116
>


Re: Reset JMX counters for monitoring without restarting

2016-04-02 Thread Jeff Courtade
Thanks very much.

Jeff Courtade
M: 240.507.6116
On Apr 2, 2016 3:03 PM, "Otis Gospodnetić" 
wrote:

> Hi Jeff,
>
> With info that Solr provides in JMX you have to keep track of things
> yourself, do subtractions and counting yourself.
> If you don't feel like reinventing that, see
> https://sematext.com/spm/integrations/solr-monitoring/
>
> Otis
> --
> Monitoring - Log Management - Alerting - Anomaly Detection
> Solr & Elasticsearch Consulting Support Training - http://sematext.com/
>
>
> On Sat, Apr 2, 2016 at 1:06 PM, Jeff Courtade 
> wrote:
>
> > Hi,
> >
> > I am putting together some montitors for various things.
> >
> > The counters seem to be  ... from the beginning of the process.
> >
> > This makes many of them not so useful for long term monitoring and
> > alerting.
> >
> > Is there a way to rest the counters without restarting solr or reloading
> a
> > core?
> >
> > For instance: these seem to be from the time the process started.
> >
> > java -jar /opt/scripts/pkg/cmdline-jmxclient-0.10.3.jar - localhost:9010
> >
> >
> solr/collection1:id=org.apache.solr.handler.component.SearchHandler,type=/select
> > $NAME
> >
> > avgTimePerRequest.value  363.66010984870064
> > medianRequestTime.value  1240.416114498
> > 75thPcRequestTime.value  1614.2324915
> > 95thPcRequestTime.value  3048.37888109
> > 99thPcRequestTime.value  5930.183086690001
> >
> >
> >
> > --
> > Thanks,
> >
> > Jeff Courtade
> > M: 240.507.6116
> >
>


Re: Reset JMX counters for monitoring without restarting

2016-04-02 Thread Shawn Heisey
On 4/2/2016 12:27 PM, Jeff Courtade wrote:
> I was hoping there was a way without a core reload.
>
> Do you know what is different with cloud? I need to do this in both.

In cloud mode, using CoreAdmin (which is how you reload a core) is not
recommended at all.  The entire collection (all cores) can be reloaded
with the Collections API, and that is how it should be done.

Thanks,
Shawn



Re: Performance potential for updating (reindexing) documents

2016-04-02 Thread Shawn Heisey
On 4/1/2016 8:56 PM, Erick Erickson wrote:
> bq: The bottleneck is definitely Solr.
>
> Since you commented out the server.add(doclist), you're right to focus
> there. I've seen
> a few things that help.
>
> 1> batch the documents, i.e. in the doclist above the list should be
> on the order of 1,000 docs. Here
> are some numbers I worked up one time:
> https://lucidworks.com/blog/2015/10/05/really-batch-updates-solr-2/

For that test, I was just seeing how fast MySQL could push data.  Based
on the results I saw from a small-scale test where I *did* add them,
letting the code run the add on the entire database with a single thread
would have taken forever.  I'm aware of the need to batch -- the code
did create batches, it just didn't send them.

I have a couple of ideas for the design on a multi-threaded indexing
program, but haven't worked out how to implement it.

> 3> Make sure you're using CloudSolrClient.

It's not SolrCloud, so that wouldn't really be helpful. :)

Thanks,
Shawn



using custom analyzer on SolrCloud

2016-04-02 Thread Rose, Stuart J

I am trying to setup on my dev workstation a small SolrCloud in order to assess 
the faceting capability in Solr 5.5 and I have several questions.

First some context:
I need to be able to add a field that uses a custom analyzer.

In a perfect world I would be able to just drop the 'customanalyzer.jar' 
somewhere in the solr folder and trigger zookeeper to propagate that to the 
various cores. As I have not seen any mention of how to do that in the ref 
guide or online I am assuming I really do need to use the blob store thingy 
which is unfortunate.

I have worked through the following steps,

create my initial collection 'tdt2' based off of 'basic_configs'

create .system collection to add jars
add 'customanalyzer.jar' to .system

attempt (but get errors) to 'add-runtimelib' to tdt2 collection

shutdown solr so I can restart with "-Denable.runtime.lib=true"

start solr

run healthcheck on solr -c tdt2 and learn that 
tdt2 does not exist
run healthcheck on solr -c .system and learn 
that .system does not exist


So my initial questions are...

how do I start solrcloud so that it 'loads' the collections 
that have been created?

is there a more straightforward way to add a custom analyzer 
when using SolrCloud?

what mechanism do people actually use to load plugins to solr 
cloud?


Thanks!
Stuart


Same origin policy for Apache Solr 5.5

2016-04-02 Thread Aditya Desai
Hello SOLR Experts

I am interested to know if SOLR 5.5 supports Same Origin Policy. I am
trying to read the data from http://localhost:8984/Solr_1/my/directory1 and
display it on UI on http://localhost:8983/Solr_2/my/directory2.

http://localhost:8983 has Solr 4.10 running and http://localhost:8984 has
Solr 5.5 running.I am using Javascript to make XMLHTTP request, but it is
failing with NS_ERROR. So I doubt SOLR supports same origin policy.

Is this possible? Any suggestion on how to achieve this?

Thanks in advance

-- 
Aditya Ramachandra Desai
MS Computer Science Graduate Student
USC Viterbi School of Engineering
Los Angeles, CA 90007
M : +1-415-463-9864 | L : https://www.linkedin.com/in/adityardesai


Re: issue with 5.3.1 and index version

2016-04-02 Thread William Bell
What we are trying to do is - we upgraded the Solr Master machine to 5.4.1,
and the slave is 5.3.1. When it replicates to the slave, it says
"incompatible types". That seems like a valid use case to me?

BIll


On Thu, Mar 31, 2016 at 2:49 AM, Shalin Shekhar Mangar <
shalinman...@gmail.com> wrote:

> The Lucene54 is the codec name. The luceneVer in solrconfig.xml is the
> compatibility version which is used by some analyzers/tokenizers/token
> filters to provide defaults or behaviour compatible with older versions. It
> has no relation to the indexing codec being used and once an index has been
> written to by a newer version of Lucene, going back to an old version is
> not possible in most cases.
>
> On Thu, Mar 31, 2016 at 4:00 AM, William Bell  wrote:
>
> > When I index 5.4.1 using luceneVer in solrlconfig.xml of 5.3.1, the
> > segmentsw_9 files has in it Lucene54. Why? Is this a known bug?
> >
> > #strings segments_9
> >
> > segments
> >
> > Lucene54
> >
> > commitTimeMSec
> >
> > 1459374733276
> >
> >
> >
> >
> > --
> > Bill Bell
> > billnb...@gmail.com
> > cell 720-256-8076
> >
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>



-- 
Bill Bell
billnb...@gmail.com
cell 720-256-8076


How to implement Autosuggestion

2016-04-02 Thread chandan khatri
Hi All,

I've a query regarding autosuggestion. My use case is as below:

1. User enters product name (say Nokia)
2. I want suggestions along with the category with which the product
belongs. (e.g Nokia belongs to "electronics" and "mobile" category) so I
want suggestion like Nokia in electronics and Nokia in mobile.

I am able to get the suggestions using the OOTB AnalyzingInFixSuggester but
not sure how I can get the category along with the suggestion(can this
category be considered as facet of the suggestion??)

Any help/pointer is highly appreciated.

Thanks,
Chandan