Adding information to Solr response in custom filter query code?

2016-05-16 Thread ruby
Is there a way to add a flag (or name value pair to Json resonse) in result
being returned from Solr based on some security handling which happens in
custom post filter code?

How about if in custom post filter code I added the information to request
context and then in a custom response builder, use that information to build
the response object? how to add this flag to the result?




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Adding-information-to-Solr-response-in-custom-filter-query-code-tp4276976.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Adding information to Solr response in custom filter query code?

2016-05-17 Thread ruby
Thanks for your reply. 

Is there any way a custom search component can access data created in custom
post filter query so that the data can be added to the response?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Adding-information-to-Solr-response-in-custom-filter-query-code-tp4276976p4277236.html
Sent from the Solr - User mailing list archive at Nabble.com.


can custom search component access data in custom post filter component?

2016-05-17 Thread ruby
Is there any way a custom search component can access data created in custom
post filter query component so that the data can be added to the response?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/can-custom-search-component-access-data-in-custom-post-filter-component-tp4277245.html
Sent from the Solr - User mailing list archive at Nabble.com.


Using Solr invariants to set facet method?

2016-08-17 Thread ruby
Is it possible to use the invariants in Solr config to set facet.method to
override what user is sending?


  enum




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Using-Solr-invariants-to-set-facet-method-tp4292142.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Using Solr invariants to set facet method?

2016-08-17 Thread ruby
Thanks for your reply. I was not seeing the param being added in return
results. but after adding echoParams=true, I see that facet method is being
added. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Using-Solr-invariants-to-set-facet-method-tp4292142p4292149.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr boost function taking precedence over relevance boosting

2016-11-08 Thread ruby
I have the following query (which was working until I migrated to Solr 5.1)
with boost:

http://localhost:8983/solr/?wt=json&q={!boost+b=recip(ms(NOW,modification_date),3.16e-11,1,1)}{!boost+b=recip(ms(NOW,creation_date),3.16e-11,1,1)}Copy_field:(bolt)^10
OR object_name:(bolt)^300

The above query would list the objects with name "bolt" first and then other
objects having "bolt" value in other properties. If two objects had "bolt"
in name, then it would boost the ones with recent modification,creation
dates.

This has been working until I moved to Solr 5.1. If I remove the date boost
functions then objects having "bolt" in name are listed first. However, I
still want to apply date boost functions to make sure if multiple objects
having "bolt" in name is returned then the application shows the recent ones
first. 

Did something change in the Solr date boost functions?
If not, then is there something wrong with my query?
Is my understanding of date boost function with relevancy boosting current?

Thanks,
Ruby



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-boost-function-taking-precedence-over-relevance-boosting-tp4305129.html
Sent from the Solr - User mailing list archive at Nabble.com.


Return only matched multi-valued field

2017-08-21 Thread ruby
Is there a way to return only the matched field from a multivalued field
using filtering?





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Return-only-matched-multi-valued-field-tp4351494.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr returning same object in different page

2017-09-12 Thread ruby
I'm running into a issue where an object is appearing twice when we are
paging. My query is gives documents boost based on field values. First query
returns 50 object. Second query is exactly same as first query, except
getting next 50 objects. We are noticing that few objects which were
returned before are being returned again in the second page. Is this a known
issue with Solr?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr returning same object in different page

2017-09-12 Thread ruby
I'm running into a issue where an object is appearing twice when we are
paging. My query is gives documents boost based on field values. First query
returns 50 object. Second query is exactly same as first query, except
getting next 50 objects. We are noticing that few objects which were
returned before are being returned again in the second page. Is this a known
issue with Solr?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr returning same object in different page

2017-09-12 Thread ruby
Hi Shawn,
No index change is happening in this case.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr - google like suggestion

2017-09-13 Thread ruby
So I followed following article to enable google like suggestions in my
application:
https://lucidworks.com/2015/03/04/solr-suggester/

How do I control how many words are being returned ?

Many thanks.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr boost function taking precedence over relevance boosting

2017-10-04 Thread ruby
I have a usecase where:
if a document has the search string in it's name_property field, then I want
to show that document on top. If multiple document has the search string in
it's name_property field then I want to sort them by creation date. 

Following is my query:
q={!boost+b=recip(ms(NOW,creation_date),3.16e-11,1,1)}(all_poperty_copy_field:(xyz)
OR name_property:xyz^300)

all_poperty_copy_field is the copy field where all property values are
copied over. 
name_property field contains document name. 

If my search returns 3 docs. Two of them created few years back and one
created today. Then even though the one created today does not have search
string in name_property, it's boosted to the top with above query. Is there
a way to make sure that only the object having search string in it's name is
boosted to top and if multiple objects have this string in their
name_property field, then they are sorted by creation date?

Thanks so much in advance.






--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr boost property through request handler in solrconfig.xml

2017-10-19 Thread ruby
If I'm not using edismax or dismax, is there a way to boost a specific
property through solrconfig.xml? I'm avoiding hard-coding boost in query.
Following is my the request handler  in solronfig.xml right now





 explicit
 10
 myFiled   
 OR
 fc
  




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr boost property through request handler in solrconfig.xml

2017-10-19 Thread ruby
If I'm not using edismax or dismax, is there a way to boost a specific
property through solrconfig.xml? I'm avoiding hard-coding boost in query.
Following is my the request handler  in solronfig.xml right now





 explicit
 10
 myFiled   
 OR
 fc
  




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr boosting multiple fields using edismax parser.

2017-10-23 Thread ruby
If I want to boost multiple fields using Edismax query parser, is following
the correct way of doing it:



edismax
field1:(apple)^500  
field1:(orange)^400  
field1:(pear)^300 
field2:(4)^500  
field2:(2)^100 
recip(ms(NOW,mod_date),3.16e-11,1,1)
recip(ms(NOW,creation_date),3.16e-11,1,1)

And if boost is configured in solrconfig.xml, can I still pass additional
boost queries through boost query?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr boosting multiple fields using edismax parser.

2017-10-23 Thread ruby
If I want to boost multiple fields using Edismax query parser, is following
the correct way of doing it:



edismax
field1:(apple)^500  
field1:(orange)^400  
field1:(pear)^300 
field2:(4)^500  
field2:(2)^100 
recip(ms(NOW,mod_date),3.16e-11,1,1)
recip(ms(NOW,creation_date),3.16e-11,1,1)

And if boost is configured in solrconfig.xml, can I still pass additional
boost queries through boost query?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr boosting multiple fields using edismax parser.

2017-10-23 Thread ruby
Thanks for your reply.

can the recip function be used to boost  a numeric field here: 

recip(ord(rating),100,1,1) 










--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr-Edismax boost a property

2017-10-24 Thread ruby
I'm new to edismax query parser. Trying to figure out how to boost a specific
field over a copy fields.

I want to show all documents for which the *object_name* property contains
the search string first and then list all documents which has the value in
FTS_CopyField  and finally show the documents which have the value in
DTS_CopyField.

My search happens against two copyfields called FTS_CopyField and
DTS_CopyField. These two fields contain values from all properties/fields.

q=FTS_CopyField:oneapple OR DTS_CopyField:oneapple OR 

so far my search handler looks like:

   

edismax
 explicit
 10
 FTS_CopyField
 FTS_CopyField^200
 DTS_CopyField^10
 object_name^500   
 
 prop1:(best)^500  
 prop2:(candidate)^400  

 rating:(5)^500
recip(ms(NOW,last_mod_date),3.16e-11,1,1)^2
recip(ms(NOW,creation_date),3.16e-11,1,1)^1 
 AND
 fc
  
  


Is the obove the correct way of boosting object_name filed? 
Also how do I boost full match over partial match? if a document has
oneapple then I want to show it first and then other documents which have
words starting with oneapple.

Thank so much in advance.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr-Edismax boost a property

2017-10-24 Thread ruby
I'm new to edismax query parser. Trying to figure out how to boost a specific
field over a copy fields.

I want to show all documents for which the *object_name* property contains
the search string first and then list all documents which has the value in
FTS_CopyField  and finally show the documents which have the value in
DTS_CopyField.

My search happens against two copyfields called FTS_CopyField and
DTS_CopyField. These two fields contain values from all properties/fields.

q=FTS_CopyField:oneapple OR DTS_CopyField:oneapple OR 

so far my search handler looks like:

   

edismax
 explicit
 10
 FTS_CopyField
 FTS_CopyField^200
 DTS_CopyField^10
 object_name^500   
 
 prop1:(best)^500  
 prop2:(candidate)^400  

 rating:(5)^500
recip(ms(NOW,last_mod_date),3.16e-11,1,1)^2
recip(ms(NOW,creation_date),3.16e-11,1,1)^1 
 AND
 fc
  
  


Is the obove the correct way of boosting object_name filed? 
Also how do I boost full match over partial match? if a document has
oneapple then I want to show it first and then other documents which have
words starting with oneapple.

Thank so much in advance.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Edismax - bq taking precedence over pf

2017-10-26 Thread ruby
I'm noticing in my following query bq= is taking precedence over pf.

&q=Manufacturing
&qf=Catch_all_Copy_field
&pf=object_id^40+object_name^700
&bq=object_rating:(best)^10
&bq=object_rating:(candidate)^8
&bq=object_rating:(placeholder)^5
&bq=object_type_:(typeA)^10
&bq=object_type_:(typeB)^10
&bq=object_type_:(typeC)^10

My intention is to show all objects of typeA having "Manufacturing" in name
first

But I'm seeing all typeA,TypeB,TypeC objects are being listed first,
eventhough if their name is Not "Manufacturing".

Is my query correct or my understanding of pf and bq parameters correct?

Thanks



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Edismax - bq taking precedence over pf

2017-10-26 Thread ruby
ok. Shouldn't pf be applied on top of bq=? that way among the object_types
boosted, if one has "Manufacturing" then it should be listed first?

following are my objects:



1
Configuration
typeA
Manufacturing
 <--catch all field where contents of all fields get
copied to



2
Manufacturing
typeA
xyz
 <--catch all field where contents of all fields get
copied to


I'm hoping to get id=2 first then get id=1 but I'm not seeing that. is my
understanding of qf= not correct?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr - phrase suggestion returning duplicate

2017-11-07 Thread ruby
I'm trying to enable phrase suggestion in my application by using
*AnalyzingInfixLookupFactory *and *DocumentDictionaryFactory*. Following is
what my configuration looks like:


  
mySuggester
  AnalyzingInfixLookupFactory
  suggester_infix_dir
DocumentDictionaryFactory
title
suggestType
false
false
  


  
true
10
mySuggester
  
  
suggest
  


I have following documents indexed:


44




11
Video gaming: the history



55
Video games: multiplayer gaming



33
Video gaming: the history


After indexing documents and building the suggester, when I query I get
duplicate suggestions

q.suggest=video
returns
[
  {
"id":"44",
"*title":"Video gaming: the history"},*
  {
"id":"33",
"title":"Video games: multiplayer gaming"},
  {
"id":"44",
*"title":"Video gaming: the history"}]*

Is this a known bug with Solr suggester? shouldn't suggester by default
return unique suggestions?


Thanks



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr - phrase suggestion returning duplicate

2017-11-07 Thread ruby
yes, id is an unique field.

I found following issue in Jira:
https://issues.apache.org/jira/browse/LUCENE-6336

It says affected versions are 4.10.3, 5.0. I'm using Solr 6.1 and seeing
this issue.

You can recreate it by indexing those documents I shared and querying.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr - phrase suggestion returning duplicate

2017-11-07 Thread ruby
Yes, Id is an unique field in my schema.

I found following Jira issue:
https://issues.apache.org/jira/browse/LUCENE-6336

It looks related to me. It does not mention that it was fixed. Is it fixed
in Solr 6.1? I'm using Solr 6.1



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr - phrase suggestion returning duplicate

2017-11-08 Thread ruby
Alessandro, thanks for your reply.

What do you mean by "In case you decide to use an entire new index for the
autosuggestion, you 
can potentially manage that on your own".

Is this duplicate issue a problem with the DocumentDictionaryFactory? 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Phrase suggester - field limit and order

2017-11-09 Thread ruby
I'm using the BlendedInfixLookupFactory to get phrase suggestions. It returns
the entire field content. I've tried the others and they do the same. 

  AnalyzingInfixSuggester
  BlendedInfixLookupFactory 
  DocumentDictionaryFactory
  title
  price
  text_en


Is there a way to only return a fraction of the phrase containing the
matched phrase? Also is there a way to control in which order the
suggestions are returned?

Thanks



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


RE: Phrase suggester - field limit and order

2017-11-13 Thread ruby
thanks for your reply.
I'm not seeing any documentation explaining exactly how the weightField is
used.

So, is it just a field which I define on each document and populate with
some number during index. And during search it will be used to sort the
suggestions?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Search suggester - threshold parameter

2017-11-16 Thread ruby
Does the threshold parameter work with  any of the phrase suggestion
component?

https://lucene.apache.org/solr/guide/6_6/suggester.html


 
  AnalyzingInfixSuggester 
  BlendedInfixLookupFactory 
  DocumentDictionaryFactory 
  title 
  price 
  text_en 
   *0.005*
 

The wiki page does not mention controlling threshold and I tried changing
the threshold parameter and not seeing any difference.





--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Search suggester - threshold parameter

2017-11-17 Thread ruby
Does any of the phrase suggesters in  Solr 6.1 honor the threshold parameter? 

I made following changes to enable phrase suggestion in my environment.
Played with different threshold values but looks like the parameter is not
being used.


  
mySuggester
FuzzyLookupFactory
suggester_fuzzy_dir



DocumentDictionaryFactory
title
suggestType
false
false
*0.005*
  



  
true
10
mySuggester
  
  
suggest
  




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr suggester build takes a very long time

2017-12-11 Thread ruby
So when following command is run to build solr suggester:
?suggest.build=true

It takes a very long time to finish. I found out that this is because each
time dictionary is built, it does not build delta, it rebuilds the entire
dictionary.

Is there a way to speed up the suggester build time?

TIA




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr: edismax boost not working

2017-12-21 Thread ruby
I'm playing with following query but can't get the *object_desc* field
boosted correctly. Maybe someone can tell me what I'm missing here:

&wt=json&&defType=edismax&indent=on
&q=object_name_NGRAM:video OR object_desc_NGRAM:video
&qf=object_desc_NGRAM^10 object_name^2

field definition:













 



example documents:

1
video gaming
economic




2
economic
video



2
video gaming is an economic
business
gaming



I want to boost to show the document having id=2. but my query is no
working. 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr: edismax boost not working

2017-12-21 Thread ruby
Thanks that worked. But now if I want to search against 3 fields, can that be
defined in solrconfig.xml?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr admin client crash - caused by too many fields

2018-08-14 Thread ruby
Thanks for your answer.
In previous Solr version (5.0) I had same number of fields and didn't run
into this issue. Did anything change in Solr 6.0 above?

Thanks



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr - how does faceting returned unstored values?

2018-01-05 Thread ruby
The Solr document states that the purpose of the stored attribute is to tell
Solr to store the original text in the index somewhere.

If that is true, then how is Solr able to return original texts when we
facet on fields which are not stored?





--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr - Managed Resources REST API to get stopwords

2018-02-13 Thread ruby
I added following to my Solr schema:








   

and then restarted Solr.

Should following query return all stopwords?
http://localhost/solr/collection/schema/analysis/stopwords/english

I don't get any stopwords in response. I see following:
{
  "responseHeader":{
"status":0,
"QTime":1},
  "wordSet":{
"initArgs":{"ignoreCase":false},
"initializedOn":"2018-02-13T20:26:37.378Z",
"managedList":[]}}

What am I doing wrong?

Thanks so much.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr - Managed Resources REST API to get stopwords

2018-02-14 Thread ruby
I was hoping to get back the list of stopwords which are defined in 
server\solr\collection\conf\lang\stopwords_en.txt  file.

So are you saying this REST api can't give me access to stopwords defined in
this file?

Is there a query which will give me stopwords defined in
server\solr\collection\conf\lang\stopwords_en.txt  file ?

Thanks



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr - SpellCheckComponent Threshold parameter value not being honored.

2018-06-20 Thread ruby
I'm using the SpellCheckComponent to build term suggestions. It's working in
most cases but for few words I am not seeing suggestions. There are around
14652 in total indexed. Out of them 856 documents start with the word "feq".
When we search by "feq" we get results back but spellcheck does not return
anything. 

If our threshold is set to .001, which means 
0.0584 fraction of data has "feq", should we see the words starting with
"feq" in spellcheck suggestions?

Following is what our configuration looks like:

   

 Suggester
 org.apache.solr.spelling.suggest.Suggester
 org.apache.solr.spelling.suggest.tst.TSTLookup
 CopyField
 0.001
 false
 false
  
  



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr admin client crash - caused by too many fields

2018-08-10 Thread ruby
I have 60 thousand fields in schema. When I go to the Analysis page to
analyze a field content

http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=xyz&analysis.query=xyz&analysis.fieldname=field1&verbose_output=0

the admin panel crashes and shows error: Connection to Solr lost. Please see
Solr instance. 

The Solr log shows following error:

2018-08-10 09:37:49.745 INFO  (qtp870698190-19) [   x:collection1]
o.a.s.c.S.Request [collection1]  webapp=/solr path=/admin/luke
params={show=schema&wt=json&_=1533908056267} status=0 QTime=17709
2018-08-10 09:37:49.748 INFO  (qtp870698190-19) [   x:collection1]
o.a.s.s.HttpSolrCall Unable to write response, client closed connection or
we are shutting down
org.eclipse.jetty.io.EofException
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:197)
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:419)
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313)
at 
org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:141)
at
org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:732)
at
org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
at
org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:512)


Any idea how to fix this issue?

Thanks



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Solr admin client crash - caused by too many fields

2018-08-10 Thread ruby
I have 60 thousand fields in schema. When I go to the Analysis page to
analyze a field content

http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=xyz&analysis.query=xyz&analysis.fieldname=field1&verbose_output=0

the admin panel crashes and shows error: Connection to Solr lost. Please see
Solr instance. 

The Solr log shows following error:

2018-08-10 09:37:49.745 INFO  (qtp870698190-19) [   x:collection1]
o.a.s.c.S.Request [collection1]  webapp=/solr path=/admin/luke
params={show=schema&wt=json&_=1533908056267} status=0 QTime=17709
2018-08-10 09:37:49.748 INFO  (qtp870698190-19) [   x:collection1]
o.a.s.s.HttpSolrCall Unable to write response, client closed connection or
we are shutting down
org.eclipse.jetty.io.EofException
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:197)
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:419)
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313)
at 
org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:141)
at
org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:732)
at
org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
at
org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:512)


Any idea how to fix this issue?

Thanks



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html