Can I use tokenizer twice ?

2015-10-14 Thread vit
I have Solr 4.2
I need to do the following:

1. white space tokenize
2. create shingles
3. use EdgeNGramFilter for each word in shingles, but not in a shingle as a
string

So can I do this?

* *


* *




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


Re: How to use FuzzyQuery in schema.xml

2015-10-12 Thread vit
Thanks Upayavira for clarification. This works for one token query, but when
I try it in a multi tokens like 
"Home Builders~" or "Home Builders~0.5" it does not work. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-use-FuzzyQuery-in-schema-xml-tp4233900p4234106.html
Sent from the Solr - User mailing list archive at Nabble.com.


EdgeNGramFilterFactory for phrases

2015-10-12 Thread vit
I use Solr 4.2
I creted a field with the following analyzer :
 
 


for both index and search.
Maybe KStem is an overkill but I do not think it is important here. 

On phrase search "Peak physical" it returns result:
"Peak Physical Therapy Physical Therapy Of Brooklyn"

For "Peak Physica"
it returns the same result, 

BUT for "Pea Physical"
it does not return anything, Why?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/EdgeNGramFilterFactory-for-phrases-tp4234168.html
Sent from the Solr - User mailing list archive at Nabble.com.


How to use FuzzyQuery in schema.xml

2015-10-10 Thread vit
I am using Solr 4.2
For some reason I cannot find an example of http://lucene.472066.n3.nabble.com/How-to-use-FuzzyQuery-in-schema-xml-tp4233900.html
Sent from the Solr - User mailing list archive at Nabble.com.


words n-gram analyser

2015-10-07 Thread vit
Does Solr 4.2 have n-gram filter over words, not symbols like
EdgeNGramFilterFactory.

I hoped NGramTokenFilterFactory serves this purposes but looks like it also
creates n-grams over symbols.

I used it this way 

in hope that I will get 3-words to 10-words



--
View this message in context: 
http://lucene.472066.n3.nabble.com/words-n-gram-analyser-tp4233362.html
Sent from the Solr - User mailing list archive at Nabble.com.


Fuzzy search for names and phrases

2015-10-07 Thread vit
Could someone share experience on applying name fuzzy search using Solr. 
It should not be just the one which uses Edit Distance. I also want to cover
cases with split and merge like "OneIndustrial" vs "One Industrial", etc.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Fuzzy-search-for-names-and-phrases-tp4233209.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: EdgeNGramFilterFactory question

2015-10-07 Thread vit
any experience with  EdgeNGramFilterFactory will be appreciated 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/EdgeNGramFilterFactory-question-tp4233034p4233210.html
Sent from the Solr - User mailing list archive at Nabble.com.


EdgeNGramFilterFactory question

2015-10-06 Thread vit
I have Solr 4.2

1) Is it possible to somehow use EdgeNGramFilterFactory ignoring white
spaces in n-grams?

2) Is it possible to use EdgeNGramFilterFactory in combination with stemming
?
Say applying this to "look for close hotel" instead of "looking for
closest hotels"



--
View this message in context: 
http://lucene.472066.n3.nabble.com/EdgeNGramFilterFactory-question-tp4233034.html
Sent from the Solr - User mailing list archive at Nabble.com.


How can I break/modify Solr internal synonyms

2015-03-04 Thread vit
I use Solr 4.2
On Siamese  I am getting Thailand results which has bad user experience with
our customers. 
It happens in filter class=solr.KStemFilterFactory / (KSF in Analyzer
tool)

Looks like it is a built in mapping. 
How can I change this kind of mapping?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-can-I-break-modify-Solr-internal-synonyms-tp4191033.html
Sent from the Solr - User mailing list archive at Nabble.com.


trouble running indexer with Solr spatial

2015-01-27 Thread vit
I am using Solr 4.2

I added 
fieldType name=location_rpt  
class=solr.SpatialRecursivePrefixTreeFieldType

according to
a href=http://;https://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4 
 and have spatial4j-0.3.jar in my project.

When running the indexer I started getting this error:

java.lang.NoClassDefFoundError: com/google/common/cache/CacheBuilder
at
org.apache.solr.schema.AbstractSpatialFieldType.init(AbstractSpatialFieldType.java:82)
at
org.apache.solr.schema.AbstractSpatialPrefixTreeFieldType.init(AbstractSpatialPrefixTreeFieldType.java:32)
at
org.apache.solr.schema.SpatialRecursivePrefixTreeFieldType.init(SpatialRecursivePrefixTreeFieldType.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)
at
org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:470)
at
org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:458)
at
org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:81)
at
org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:43)
at
org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:374)
at org.apache.solr.schema.IndexSchema.init(IndexSchema.java:122)
at org.apache.solr.core.SolrCore.init(SolrCore.java:684)
at org.apache.solr.core.SolrCore.init(SolrCore.java:618)



--
View this message in context: 
http://lucene.472066.n3.nabble.com/trouble-running-indexer-with-Solr-spatial-tp4182359.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Showing distance in results

2015-01-27 Thread vit
Hi Erick 
I tried this link but do not see a straight forward answer. 
For example it says:
/You can use the pseudo-field feature to return the distance along with the
stored fields of each document by adding fl=geodist() to the request/
So I tried:
...?q={!func}dist(2, lat, lng, 0, 0)fl=geodist()wt=xmlindent=true
http://   which returnes:
*lst name=error
  str name=msgError parsing fieldname: geodist - not enough
parameters:[]/str
  int name=code400/int
/lst*

Also it is not clear what is sfield=store in all examples, like this:
...q={!func}geodist()sfield=storept=45.15,-93.85sort=score asc http://  
So if possible could you explain this either. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Showing-distance-in-results-tp4182077p4182284.html
Sent from the Solr - User mailing list archive at Nabble.com.


Showing distance in results

2015-01-26 Thread vit
I have Solr 4.2
I need to calculate the distance between a point (0, 0) and lat lng in each
document. I do this
http://host:9081/solr/collection1/select?q={!func}dist(2, lat, lng, 0,
0)wt=xmlindent=true

It works fine but does not show the distance, Please help.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Showing-distance-in-results-tp4182077.html
Sent from the Solr - User mailing list archive at Nabble.com.


Distinct Results from Solr Query

2015-01-19 Thread vit
I am using Solr 4.2
In the ressults set we are getting documents with the same field value.
Is it possible to indicate in the query that we need results with distinct
value of this field?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Distinct-Results-from-Solr-Query-tp4180471.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Distinct Results from Solr Query

2015-01-19 Thread vit
In other words I need to pick only one document per the field value. 
Say I have a filed cat_id. For each value of this filed returned I need to
return only 1 document and I do not care which one.  



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Distinct-Results-from-Solr-Query-tp4180471p4180483.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Distinct Results from Solr Query

2015-01-19 Thread vit
Unfortunately grouping will not work here since my field is multi-valued. 
So I need another solution.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Distinct-Results-from-Solr-Query-tp4180471p4180499.html
Sent from the Solr - User mailing list archive at Nabble.com.


get one document per value in multivalued field

2015-01-12 Thread vit
I use Solr4.21
my multivalued filed is like that:
q=(category_id:(484986 520623 484339 519258 516227 486757) ..

How to construct a query which will show one top document per category_id
value?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-one-document-per-value-in-multivalued-field-tp4179056.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: get one document per value in multivalued field

2015-01-12 Thread vit
The field must be single-valued for grouping. That is why I do not consider
this option. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/get-one-document-per-value-in-multivalued-field-tp4179056p4179065.html
Sent from the Solr - User mailing list archive at Nabble.com.


Shingles from sentences

2014-12-01 Thread vit
I have a text consisting from sentences. Which analyzer can I use to restrict
creating shingles from sentences. Meaning a shingle cannot have parts from
two neighbor sentences.  



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Shingles-from-sentences-tp4171834.html
Sent from the Solr - User mailing list archive at Nabble.com.


Help on matching a shingle in a query to a shingle in the document

2014-11-25 Thread vit
Example what I need:
Query:
Hi likes *this kind of winter *weather
Document shingle field:
They like *this kind of winter *with many sunny days 

So I need to match *this kind of winter *.

What tokenisers and filters and maybe something else should be used for this
kind of match. 

I tried for example this one, but it matches the entire query to a shingle:
fieldType name=text_shingle class=solr.TextField
positionIncrementGap=100
   analyzer type=index
 tokenizer class=solr.StandardTokenizerFactory/
 filter class=solr.LowerCaseFilterFactory /
 filter class=solr.ShingleFilterFactory minShingleSize=2
maxShingleSize=5
 outputUnigrams=false outputUnigramsIfNoShingles=true
tokenSeparator= /
   /analyzer
   analyzer type=query
 tokenizer class=solr.StandardTokenizerFactory/
 filter class=solr.LowerCaseFilterFactory /
 filter class=solr.ShingleFilterFactory minShingleSize=2
maxShingleSize=5
 outputUnigrams=false outputUnigramsIfNoShingles=true
tokenSeparator= /
   /analyzer
 /fieldType




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Help-on-matching-a-shingle-in-a-query-to-a-shingle-in-the-document-tp4170852.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Help on matching a shingle in a query to a shingle in the document

2014-11-25 Thread vit
Erick,
What you are saying of course makes perfect sense. 
But in our particular situation there is a high probability that an
essential part of the query will match a meaningful part or a business name
in a short description indexed as shingle. 
Also it is better than just a broad match.
Besides I am on the research stage and will run some analysis for queries
and results. 

So from what you are saying to reach my goal I need to shingle a query
myself in the preprocessing stage and try to match it using OR with my
shingled field. Is it correct? Or there is some more elegant way to handle
it. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Help-on-matching-a-shingle-in-a-query-to-a-shingle-in-the-document-tp4170852p4170905.html
Sent from the Solr - User mailing list archive at Nabble.com.


matching shingles issue

2014-11-24 Thread vit
I have Solr 4.2.1
I am using the following analyser:
fieldType name=text_shingle class=solr.TextField
positionIncrementGap=100
analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.ShingleFilterFactory 
minShingleSize=2
maxShingleSize=5
outputUnigrams=true 
outputUnigramsIfNoShingles=false
tokenSeparator= /
/analyzer
analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.ShingleFilterFactory 
minShingleSize=2
maxShingleSize=5
outputUnigrams=false 
outputUnigramsIfNoShingles=true
tokenSeparator= /
/analyzer
/fieldType



for Query: 
description_shingle:Highest quality

I am getting Result:
arr name=description_shingle
  strHighest standards of quality installations!/str
/arr

So the result does not have shingle Highest quality
Instead it has 
Highest standards of quality

The question is why I am getting this match



--
View this message in context: 
http://lucene.472066.n3.nabble.com/matching-shingles-issue-tp4170685.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: matching shingles

2014-11-22 Thread vit
I set the following filed type
fieldType name=text_shingle class=solr.TextField
positionIncrementGap=100
analyzer
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.ShingleFilterFactory 
minShingleSize=2
maxShingleSize=5
outputUnigrams=true 
outputUnigramsIfNoShingles=false
tokenSeparator= /
/analyzer
/fieldType

with minShingleSize=2

But it allows to match a single word. What I am doing wrong?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/matching-shingles-tp4170259p4170364.html
Sent from the Solr - User mailing list archive at Nabble.com.


matching shingles

2014-11-21 Thread vit
I am using Solr 4.2.1 Could someone give me an example how to create a query
wich will be analysed to match shingles



--
View this message in context: 
http://lucene.472066.n3.nabble.com/matching-shingles-tp4170259.html
Sent from the Solr - User mailing list archive at Nabble.com.


How to count the number of faceting entries ?

2014-06-16 Thread vit
I am placing the following query
http://server/solr/collection1/select?q=*%3A*wt=xmlindent=truefacet=truefacet.field=category_idfacet.limit=-100
Which gives unlimited number of faceted results for category_id.

What do I need to add to the query to get the number of faceted results?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-count-the-number-of-faceting-entries-tp4142114.html
Sent from the Solr - User mailing list archive at Nabble.com.


How to check and handle empty Solr query

2014-05-30 Thread vit
In my code sometimes I get an emty query. Namely ... q= which causes
bad request exception. 
How to gracefully check query correctness and bypass execution if it is not
correct.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-check-and-handle-empty-Solr-query-tp4138877.html
Sent from the Solr - User mailing list archive at Nabble.com.


boosting multivalued fields

2014-05-21 Thread vit
is it posiible to boost values of the same field. For example in a query like
that:
category_id:(2271578^0.5 22718986^0.4 475101^0.2)



--
View this message in context: 
http://lucene.472066.n3.nabble.com/boosting-multivalued-fields-tp4137409.html
Sent from the Solr - User mailing list archive at Nabble.com.


Difference between addfield and setfield in SolrInputDocument

2014-03-17 Thread vit
Could someone explain me, please, the difference between addfield and
setfield in SolrInputDocument



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Difference-between-addfield-and-setfield-in-SolrInputDocument-tp4124809.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr faceted search not working for a certain request handler

2014-03-17 Thread vit
We have a big Solr search application where I need to add a faceted search
for a certain request handler. 
And it does not work whereas for select handler it does.  
I tried to find something in the configuration but could not. 
If possible, please let me know where I should look at to find the reason.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-faceted-search-not-working-for-a-certain-request-handler-tp4124838.html
Sent from the Solr - User mailing list archive at Nabble.com.