AW: How can I create about 100000 independent indexes in Solr?

2012-09-25 Thread Christian Bordis
Hi weizhenyu! (can you write down your name in roman latters)

We also tried to provide dedicated cores for each customer in one of our early 
system design to get maximum config possibilities.  
40k Webshops  = 40k Solr Cores, which didn't work out.

Problems we encountered:
- Threads: Solr create one thread to interact with each core in 3.x of solr , 
40k therads will kill any server  performance
- FileSystem: Each Core needed number of files 30 -100 files depending on 
settings etc. 40.000 x 100 file handles was not an option for the CentOS (and 
most other OS)
- Managing 100k configs is problem of its own

You may look for other solution e.g. split the user base in small number of 
Cores by use case and try to cover their needs.  (btw the solrconfig.xml, 
schema.xml ultra flexible most likely the cover 95% of your requirements)

Regards,
Christian Bordis

-Ursprüngliche Nachricht-
Von: 韦震宇 [mailto:weizhe...@win-trust.com] 
Gesendet: Dienstag, 25. September 2012 04:21
An: solr-user@lucene.apache.org
Betreff: How can I create about 10 independent indexes in Solr?

Dear all,
The company I'm working in have a website to server more than 10 
customers, and every customer should have it's own search cataegory. So I 
should create independent index for every customer.
The site http://wiki.apache.org/solr/MultipleIndexes give some solution to 
create multiple indexes.
I want to use multicore solution. But i'm afraid that Solr can't support so 
many indexes in this solution.
The other solution Flattening data into a single index is a choice, but i 
think it's best to keep all indexes indepent.  
Could you tell me how to create about 10 independent indexes in Solr?
Thank you all for reply!



Range operator problems in Chef ( automating framework)

2012-09-24 Thread Christian Bordis
Hi Everyone!

We doing some nice stuff with Chef (http://wiki.opscode.com/display/chef/Home). 
 It uses solr for search but range queries don't work as expected. Maybe chef, 
solr just buggy or I am doing it wrong ;-)

In chef I have bunch of nodes witch timestamp attribute. Now want search nodes 
with have timestamp not older than on hour:

search(:node, role:JSlave AND ohai_time:[NOW-1HOUR TO *])

Is this string in the call a solr compliant range expression at all? Unluckily, 
 I have no toys at hand to verify this myself at the moment... but I work on 
this.

Thanks for reading! ^^

Kind Regards,

Christian Bordis


AW: Problem with DIH: How to map key value pair stored in 1-N relation from a JDBC Source?

2011-08-10 Thread Christian Bordis
Thanks, 
for this quick and enlightening answer! 

I didn't consider that a Transformer can create new columns. In combination 
with dynamic fields it is exactly what I was looking for.

Thanks James ^^

-Ursprüngliche Nachricht-
Von: Dyer, James [mailto:james.d...@ingrambook.com] 
Gesendet: Dienstag, 9. August 2011 16:03
An: solr-user@lucene.apache.org
Betreff: RE: Problem with DIH: How to map key value pair stored in 1-N relation 
from a JDBC Source?

Christian,

It looks like you should probably write a Transformer for your DIH script.  I 
assume you have a child entity set up for PriceTable.  Add a Transformer to 
this entity that will look at the value of currency and price, remove these 
from the row, then add them back in with currency as the field name and 
price as the column value.

By the way, it would likely be better if instead of field names like EUR and 
CHF, you created a dynamic field entry in schema.xml with a dynamic field 
like this:

dynamicField name=CURRENCY_* type=tfloat indexed=true stored=false /

Then have your DIH Transformer prepend CURRENCY_ in front of the field name.  
This way should your company ever add a new currency, you wouldn't need to 
change your schema.

For more information on writing a DIH Transformer, see 
http://wiki.apache.org/solr/DIHCustomTransformer

If you would rather use a scripting language such as javascript instead of 
writing your Transformer in java, see 
http://wiki.apache.org/solr/DataImportHandler#ScriptTransformer .

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


Problem with DIH: How to map key value pair stored in 1-N relation from a JDBC Source?

2011-08-09 Thread Christian Bordis
Hi!
After 1,5 days digging on google, solr wiki, solr 1.4 book (Smiley/Pugh), 
solr-user mailing list no solution turn up for my problem *sigh*.

I use:
- solr 3.3
- Date Import Handler 3.3
- JDBC source is MySQL

Constrains:
- No changes to core database schema
- I can only add new views, stored procedures/functions

My Problem:

Our users can set prices for their product as they wish, regardless of any 
currency conversion rate etc. These prices are stored in an extra table, a 
classic 1-N relation.


ProductTable
ProductIDName   ...
1  Fairydust
2  Pot of Gold (rainbow not included)
...

PriceTable
IDProductIDCurrency   Price   ...
11   EUR 3,99
21   CHF 2,22
31   USD 4,50
42   EUR 
52   GBP 3599
...

My indexed documents should contain following fields(columns), hence I want to 
do facets over currencies.

Fairydust:
ProductID   Name   EUR   CHF   USD

Pot of Gold:
ProductIDNameEURGBP


Mutivalued fields wont work, because I need facets and I can't afford 192 
columns in MySQL for all currencies supported by our software.
Dynamic fields won't do the trick either as far as I know.

I already solved this problem with early shoddy lucene prototype. I didn't need 
think twice.
Do I need to switch to SolrJ and alike for this? If I switch to SolrJ do I 
suffer a panalty in index performance?

I think DIH provide the solution for this problem but I can't find it.

Any suggestions are welcome.


Thanks for reading,

Christian Bordis