How to read bag of words from Lucene index

2016-05-28 Thread vitaly bulgakov
I use Lucene 3.

How can I read content as a bag of words or similar which was indexed from a
text file?

The indexing is done in the following way:
addFiles(new File(fileName));
int originalNumDocs = writer.numDocs();
for (File f : queue) {
FileReader fr = null;
try {
Document doc = new Document();
fr = new FileReader(f);
doc.add(new Field("content", fr));  




--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-read-bag-of-words-from-Lucene-index-tp4279679.html
Sent from the Solr - User mailing list archive at Nabble.com.


Is it possible to pass parameters through solrconfig.xml ?

2016-05-24 Thread vitaly bulgakov
I need to pass a parameter to one of my searchComponent class from
solrconfog.xml file.
Please advice me how to do it if it is possible.  



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Is-it-possible-to-pass-parameters-through-solrconfig-xml-tp4278852.html
Sent from the Solr - User mailing list archive at Nabble.com.


What kind of field function !boost can be applied to?

2016-05-20 Thread vitaly bulgakov
Let's say I want to boost location. Can I apply boost function to the field
of this type:







 

If yes, could you give an example. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/What-kind-of-field-function-boost-can-be-applied-to-tp4278130.html
Sent from the Solr - User mailing list archive at Nabble.com.


calculate average memory per document

2016-05-19 Thread vitaly bulgakov
Hi, I have solr 4.2
I am wondering if it is possible to compute an average memory per document
in my index.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/calculate-average-memory-per-document-tp4277865.html
Sent from the Solr - User mailing list archive at Nabble.com.


solr.SynonymFilterFactory chages order of terms

2016-02-29 Thread vitaly bulgakov
Hi, I use solr 4.2
In schema.xml I created the following filed type:






**
 
"bn_synonyms.txt" contains:
*testword=>test word*

In Analyzer I put 
*testword cars*
After 

I am getting :
*test cars word*

So for some reason word and cars are swapped.

Could somebody explain why and how to prevent it. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-SynonymFilterFactory-chages-order-of-terms-tp4260567.html
Sent from the Solr - User mailing list archive at Nabble.com.


Is it different? q=(field1:value1 OR field2:value2) and q=field1:value1 OR field2:value2

2016-02-26 Thread vitaly bulgakov
Is there a difference when we put query in brackets? 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Is-it-different-q-field1-value1-OR-field2-value2-and-q-field1-value1-OR-field2-value2-tp4259976.html
Sent from the Solr - User mailing list archive at Nabble.com.


Adding new documents to the search results and rescoring. Is it possible?

2016-01-28 Thread vitaly bulgakov
I have Solr 4.2. Is it possible to rescore results after adding new documents
to the result set?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Adding-new-documents-to-the-search-results-and-rescoring-Is-it-possible-tp4253859.html
Sent from the Solr - User mailing list archive at Nabble.com.


SearchComponent does not handle negative fq ???

2016-01-22 Thread vitaly bulgakov
>From my experiments looks like SearchComponent does not handle negative fq
correctly.
Does anybody have have such experience ?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SearchComponent-does-not-handle-negative-fq-tp4252688.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Tokenize ShingleFilterFactory results and apply filters to tokens

2015-10-17 Thread vitaly bulgakov
/why don't you put EdgeNGramFilter just after ShingleFilter?/

Because it will do Edge Ngrams over a shingle as a string:
for "Home Improvement" shingle it will do:  Hom, Home, Home , Home I,
Home Im, Home Imp .. 

But I need:
... Hom Imp, Hom Impr ..



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Tokenize-ShingleFilterFactory-results-and-apply-filters-to-tokens-tp4234574p4234872.html
Sent from the Solr - User mailing list archive at Nabble.com.


Tokenize ShingleFilterFactory results and apply filters to tokens

2015-10-15 Thread vitaly bulgakov
I want to rephrase my question I asked in another post. 
As far as I understand filter ShingleFilterFactory creates shingle as
strings. 
But I want to apply more filters (like EdgeNgrams) to each token of a
shingle. 

For example from "Home Improvement Service" I have two shingles:
"Home Improvement" and "Improvement Service".

I want to apply EdgeNgram to be able to do exact match to:
"Hom Improvem" and "Improvemen Servi" as new phrases. 

Any, help, ideas are welcomed and appreciated.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Tokenize-ShingleFilterFactory-results-and-apply-filters-to-tokens-tp4234574.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Can I use tokenizer twice ?

2015-10-14 Thread vitaly bulgakov
Steve,
/You could achieve what you want by copying to another field and defining a
separate analyzer for each.  One would create shingles, and the other edge
ngrams. /  

Could you please elaborate this. I am not sure I understand how to do it by
using copyField.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Can-I-use-tokenizer-twice-tp4234438p4234503.html
Sent from the Solr - User mailing list archive at Nabble.com.