William Bell | 28 Jul 19:16 2015

Parameterized values


This is not working as part of QTs.

Cannot load the core, since ${value} is being used for XML parameters for
system property substitution.


Can we support both?

<str name="pspec">PS127</str>
<str name="hqval1">hosp_quality_spec_boost:${pspec}</str>

This does not work.


Bill Bell
billnbell <at> gmail.com
cell 720-256-8076
seung1 | 28 Jul 17:33 2015

solr 5 post.jar simple post tool error when indexing java extension

Hi i am using solr 5.2.1 in windows 7  
 what I was trying to do is indexing java extension file using post.jar
posting tool  
what I tried:  

    java -Dauto=yes -Dc=java -Ddata=files -Dfiletypes=java -Drecursive=yes
-jar post.jar abc.jar
it gives me error  


I also tried extensions like xyz, and it worked but only java extension does
not work  
it just does not like java extension? 


View this message in context: http://lucene.472066.n3.nabble.com/solr-5-post-jar-simple-post-tool-error-when-indexing-java-extension-tp4219509.html
Sent from the Solr - User mailing list archive at Nabble.com.

SOLR Exception with SOLR Cloud 5.1 setup on Linux


I have set up SOLR Cloud comprising of 2 solr instances and zookeeper in separate instance. Have created one
shard in one of the solr node and the other solr node act as a replica for that shard.
I am able to post documents through UI.

But while trying to connect from Java layer I am getting below error. From Java level using CLoudSolrCLient
class I am passing zookeeper host which is on 2181 port.

The collection name is umbcollection. I am not sure what is wrong here. Could someone help me in finding what
could be the rootcause.

org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at No active slice servicing hash code 103646ce in DocCollection(umbcollection)={








(Continue reading)

unique.jimish@gmail.com | 28 Jul 08:34 2015

Quantity wise price searching in Apache SOLR

Currently I am working on e-commerce website where price can be vary based on

For e.g

Product A
    Quantity | 25   | 50   | 70   | 90+   |
    Price    | 0.76 | 0.79 | 0.65 | 0.60 |

Product B
    Quantity | 25   | 40   | 65   | 80+   |
    Price    | 0.81 | 0.73 | 0.62 | 0.60  |

Please note that quantity break will be different for one and another

How I should save into solr so it fulfill following criteria.

-If user search for desired quantity, system should pick price from that
quantity range. If User search for 60 then system should show 0.65 for
"Product A" and 0.62 for "Product B"
-Also user selects desired quantity and sort by price "lowest to highest" It
should match the price where selected quantity falls. If user search for
quantity 60 then "Product B"(0.62) should be first and "Product A"(0.65)
(Continue reading)

Michael Roberts | 28 Jul 08:10 2015

Issue when zookeeper session expires during shard leader election.


I am encountering an issue which looks a lot like https://issues.apache.org/jira/browse/SOLR-6763.

However, it seems like the fix for that does not address the entire problem. That fix will only work if we hit
the zkClient.getChildren() call before the reconnect logic has finished reconnecting us to ZooKeeper
(I can reproduce scenarios where it doesn’t in 4.10.4). If the reconnect has already happened, we
won’t get the session timeout exception.

The specific problem I am seeing is slightly different SOLR-6763, but the root cause appears to be the same.
The issue that I am seeing is; during startup the collections are registered and there is one
coreZkRegister-1-thread-* per collection. The elections are started on this thread, the
/collections/≤name>/leader_elect ZNodes are created, and then the thread blocks waiting for the peers
to become available. During the block the ZooKeeper session times out.

Once we finish blocking, the reconnect logic calls register() for each collection, which restarts the
election process (although serially this time). At a later point, we can have two threads that are trying
to register the same collection.

This is incorrect, because the coreZkRegister-1-thread-’s are assuming they are leader with no
verification from zookeeper. The ephemeral leader_elect nodes they created were removed when the
session timed out. If another host started in the interim (or any point after that actually), it would see
no leader, and would attempt to become leader of the shard itself. This leads to some interesting race
conditions, where you can end up with two leaders for a shard.

It seems like a more complete fix would be to actually close the ElectionContext upon reconnect. This would
break us out of the wait for peers loop, and stop the threads from processing the rest of the leadership
logic. The reconnection logic would then continue to call register() again for each Collection, and if
the ZK state indicates it should be leader it can re-run the leadership logic.

(Continue reading)

PeterKerk | 28 Jul 03:02 2015

Use faceted search to drill down in hierarchical structure and omit node data outside current selection

I have the following structure for my products, where a product may fall into
multiple categories. In my case, a "caketopper", which would be under
"cake/caketoppers" as well as "caketoppers" (don't focus on the logic behind
the category structure in this example).

Category structure:

What I want is that when the user has chosen a category on level 0 (the main
category selection), in this case 'caketoppers', I don't want to return the
attributes/values that same product has because it's also in a different
I tried the following queries, but it keeps returning all data:

I keep getting this result (cleaned for better readability):

	<result name="response" numFound="6" start="0">
			<arr name="slug_nl_0">
(Continue reading)

Vineeth Dasaraju | 28 Jul 01:12 2015

Sum Aggregate Query for a particular field


How can I get the sum of a particular field in the documents in solr?


[{"item": "ice cream",
"price" : "345"},
{"item": "snickers",
"price" : "34"},
{"item": "hersheys",
"price" : "5"}]

I want to get the total price for the items.

Tavazoei, Masoud | 27 Jul 23:28 2015

custom aggregate function


I am working on a project in which I need to first facet my data and create buckets and then apply a customize
function to the aggregated stats. More specifically I need to look up the number of items in each bucket in
an external table and return a normalized value. How can I apply a custom function to the buckets created by
facet command?

Thank you,
Masoud Tavazoei
Member of Technical Staff IV – Platform Solution Group
Address: 499 Hamilton St., Palo Alto, CA

Bade, Vidya (Sagar | 27 Jul 21:37 2015

Help with separate root entities in DIH - One each for full and delta import.


I am currently using Solr 4.10.2 and having issues with Delta-imports. For some reason delta seems to be
inconsistent when using query caching. I am using SqlEntityProcessor. To overcome the issue I want to try
having two root entities - one each for full and delta. Can someone help with a sample format. Following is
my current data import setup:

<entity name="myDoc" pk="id" query="call getDocumentData()"
                                                            deltaImportQuery="call getDocumentDataFor(${dataimporter.delta. id})"
                                                            deltaQuery="call getNextBatchOfDocuments('${dataimporter.last_index_time}')"

                                             <field name="id" column="id"/>
                                             <field name="last_indexed_date" column="last_indexed_date" />
                                             <field name="path" column="path" />
                                             <field name="title" column="title/>
                                             <field name="description" column="desc" />
                                             <entity name="ratings" dataSource="docRatings" query="[spGetAllDocRatings]"
processor="SqlEntityProcessor" cacheImpl="SortedMapBackedCache" cacheKey="DocId"
cacheLookup=" myDoc. id">
                                                            <field column="ReviewCount" name="review_count_d" />

Thank You,
Thomas Seidl | 27 Jul 19:42 2015

Dollar signs in field names

Hi all,

I've used dollar signs in field names for several years now, as an easy
way to escape "bad" characters (like colons) coming in from the original
source of the data, and I've never had any problems. Since I don't know
of any Solr request parameters that use a dollar sign as a special
character, I also wouldn't know where one might occur.

But while I remember that the "supported" format for field names was
previously completely undocumented (and it was basically "almost
anything is supported, but some things might not work with some
characters"), I now read that for about a year there has been a strict
definition/recommendation in the Solr wiki [1] which doesn't allow for
dollar signs.

[1] https://cwiki.apache.org/confluence/display/solr/Defining+Fields

So, my question is: Is this just for an easier definition, or is there a
real danger of problems when using dollar signs in field names? Or,
differently: How "bad" of an idea is it?
Also, where was this definition discussed, why was this decision
reached? Is there really an argument against dollar signs? I have to say
it is really very handy to have a character available for field names
that is usually not allowed in programming language's identifiers (as a
cheap escape character).

Thanks in advance,

(Continue reading)


Rendering Solr JSON results from outside of Velocity

Hi people,

I have to build an application that will use Velocity templates for searching and displaying of results.
However, the searches must be first pre-processed and analyzed using an external webservice
implemented in Python. This module is also in charge of searching the results and can return a JSON object
with the final results that the Velocity templates will display. So, my first idea was to change the action
url in query_form.vm from

<form id="query-form" action="#{url_for_home}" method="GET">
to <form id="query-form" action="MY_PYTHON_WEBSERVICE_URL" method="GET">

And then sending back the JSON result. However, what I got displayed is the JSON information in text form
rather than the velocity generated html pages. So, my question is how can I make Velocity to render the
retrieved JSON object. Do I need to modify the class or setup two sytems (one for displaying and the other
for searching in solr?)

Thanks in advance for your help.



Institute for Infocomm Research disclaimer:  "This email is confidential and may be privileged. If you are
not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any
purpose, or disclose its contents to any other person. Thank you."