Solr 4.3.1 only accepts UTF-8 encoded queries?

2013-07-26 Thread Gustav
Hey guys, i have a Solr 4.3 instance running in my server, but Im having some
troubles with encoding URL querystring. 
Im currently encoding my query characters, so, when its searched for "Café",
its actually encoded to "caf%E9" and "cão" is encoded to "c%E3o".
My URLencoding in tomcat is "iso-8859-1", but when i do a query like that to
solr(?q="caf%E9") It returns the error {msg=URLDecoder: Invalid character
encoding detected after position 2 of query string / form data (while
parsing as UTF-8),code=400}. It works perfectly in my Solr 3.5 instance(with
the same configurations), but in Solr 4.3 it just wont go.

Is there any kind of configuration that i could change in Solr 4.3's config
that interprets this kind of encoding?

Thanks in advance,



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-3-1-only-accepts-UTF-8-encoded-queries-tp4080587.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Exact Match

2013-07-26 Thread Gustav
Try using the Solr's Analysis tool(http://localhost:8983/solr/analysis) to
check all the tokenizers/filters chain that modifies your query.

What's probably happening is that the field "url" uses a tokenizer or filter
that removes the *special* chars "://".



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


Re: Solr 4.3.1 only accepts UTF-8 encoded queries?

2013-07-26 Thread Gustav
Thanks for the answer Shawn,

The problem here is that in my client's application, the query beign encoded
in iso-8859-1 its a *must*. So, this is kind of a trouble here.
I just dont get how this encoding could work on queries in version 3.5, but
it doesnt in 4.3.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-3-1-only-accepts-UTF-8-encoded-queries-tp4080587p4080706.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr sorting situation!

2013-09-25 Thread Gustav
Hey guys, I know that sorting in Solr works as a cascade, but i'm kind stuck
in a rough situation:


I've got the following sort fields in a Product:
ProductSequence(0~99
default=99),ProductName(text_general),ProductType(0~1),ProductHasPrinciples(0~1),ProductInStock(0~1),ProductPrice(0~999,99)

Then, i must apply the following rules to these products(i'll put the
sorting i've done so far)

1 - Sort by the Product Sequence Field

Ok, easy! &sort=ProductSequence asc

2 - Sort by the product name inputed(that means, the product who got the
input search in name will come first), in which those, will be sorted by
price ascending

So far, so good! &sort=ProductSequence asc, rint(query({!edismax
qf=ProductName v=searchTerm})) desc, price asc

3 - And now, my problem! Then, sort the rest of the products, first those
who ProducType = 1 in which:
ProductHasPrinciples = 1 will be sorted by price ascending
ProductHasPrinciples = 0 will be sorted by price ascending

Oh boy! &sort=ProductSequence asc, rint(query({!edismax qf=ProductName
v=searchTerm})) desc, price asc, productType desc,ProductHasPrinciples desc,
price asc?

That didnt work, because it doesnt attend the third "Product type=1" 
rule,
so i tried:

&sort=ProductSequence asc, rint(query({!edismax qf=ProductName
v=searchTerm})) desc, productType desc,ProductHasPrinciples desc, price
asc?

Which also didnt work, cause it breaks the second rule "Price ascending
sorting"


Any ideas/suggestions?

Thanks :)



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


Re: Solr sorting situation!

2013-09-30 Thread Gustav
Anyone with any ideas?



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


What is the difference between a Join Query and Embedded Entities in Solr DIH?

2013-04-25 Thread Gustav
Hello guys, i saw this thread on stackoverflow, but still not satisfied with
the answers. 

I am trying to index data across multiple tables using Solr's Data Import
Handler. The official wiki on the DIH suggests using embedded entities to
link multiple tables like so:







Are these two methods functionally different? Is there a performance
difference?

Another though would be that, if using join tables in MySQL, using the SQL
query method with multiple joins could cause multiple documents to be
indexed instead of one.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/What-is-the-difference-between-a-Join-Query-and-Embedded-Entities-in-Solr-DIH-tp4058923.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: More than one sort criteria

2013-04-30 Thread Gustav
Peter, try sorting them only using one &sort parameter, separating the fields
by comma.

&sort=zip+asc,street+asc 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/More-than-one-sort-criteria-tp4059989p4060015.html
Sent from the Solr - User mailing list archive at Nabble.com.


Suggester for numbers

2012-11-21 Thread Gustav
Hello guys, 
Please i need help.. im using the suggest search component for autocomplete
in Solr 3.6.1, i have an autocomplete field wich contains two other fields:
an conteiner_name and conteiner_id just like this:

 
 
 




When i search for username in my suggester handler it returns the
suggestions just fine,
but when i search for ID (numbers) it doesnt return results at all does
anyone knows why?



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


Re: Suggester for numbers

2012-11-22 Thread Gustav
Hello Illu,
Here you go:




 
  
  
 



 


  




  

  



  




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


Re: How to round solr score ?

2013-01-18 Thread Gustav
Hey Gora, thanks for the fast answer!

I Had tried the rint(score) function before(it would be perfect in my case)
but it didnt work out, i guess it only works with indexed fields, so i got
the  "sort param could not be parsed as a query, and is not a field that
exists in the index: rint(score)" error,

And with the query() function i didnt got any successful result...

Im stuck in the same cenario as squaro. 

if two docs have score of 1.67989 and 1.6767, I would like to sort them by
price. 

My &sort rules ae something like:
&sort=score desc, price asc



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-round-solr-score-tp495198p4034551.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Block creation of new instances in Solr's startup

2013-01-22 Thread Gustav
Sorry my misunderstanding Upayavira,

Im actually talking about stopping some solr cores from loading up.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Block-creation-of-new-instances-in-Solr-s-startup-tp4035311p4035321.html
Sent from the Solr - User mailing list archive at Nabble.com.


Is it possible to do an "if" statement in a Solr query?

2012-09-12 Thread Gustav
Hello everyone, I'm working on an e-commerce website and using Solr as my
Search Engine, im really enjoying its funcionality and the search
options/performance. 
But i am stucky in a kinda tricky cenario... That what happens:

I Have  a medicine web-store, where i indexed all necessary products in my
Index Solr. 
But when i search for some medicine, following my business rules, i have to
verify if the result of my search contains any Original medicine, if there
is any, then i wouldn't show the generics of this respective medicine, on
the other hand, if there wasnt any original product in the result i would
have to return its generics.
Im currently returning the original and generics, is there a way to do this
kind of "checking" in solr?

Thanks! :)



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Is-it-possible-to-do-an-if-statement-in-a-Solr-query-tp4007311.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Is it possible to do an "if" statement in a Solr query?

2012-09-13 Thread Gustav

Walter Underwood wrote
> 
> You may be able to do this with grouping. Group on the medicine "family",
> and only show the Original if there are multiple items in the family.
> 
> wunder
> 
> On Sep 12, 2012, at 2:09 PM, Gustav wrote:
> 
>> Hello everyone, I'm working on an e-commerce website and using Solr as my
>> Search Engine, im really enjoying its funcionality and the search
>> options/performance. 
>> But i am stucky in a kinda tricky cenario... That what happens:
>> 
>> I Have  a medicine web-store, where i indexed all necessary products in
>> my
>> Index Solr. 
>> But when i search for some medicine, following my business rules, i have
>> to
>> verify if the result of my search contains any Original medicine, if
>> there
>> is any, then i wouldn't show the generics of this respective medicine, on
>> the other hand, if there wasnt any original product in the result i would
>> have to return its generics.
>> Im currently returning the original and generics, is there a way to do
>> this
>> kind of "checking" in solr?
>> 
>> Thanks! :)
>>
> 

Hum.. i havent thought about this, its a really good idea! i've never used
grouping on Solr before, will do some searching and try it out.  Thanks
Walter!



Jack Krupansky-2 wrote
> 
> You could implement a custom "search component" with that logic, if you 
> don't mind the complexity of writing Java code that runs inside the Solr 
> environment. Otherwise, just implement that logic in your app. Or, or 
> implement an "app server" which sits between Solr and your app.
> 
> http://wiki.apache.org/solr/SearchComponent
> 
> -- Jack Krupansky
> 
> 

That would be a little too advanced to me, i dont think i have enough
knowledge in java to do a custom Search component... I could do that in my
app, but just wanted to know if its possible with Solr. App server? Will
search about it! Thank you Jack,


Amit Nithian wrote
> 
> If the fact that it's "original" vs "generic" is a field "is_original"
> 0/1 can you sort by is_original? Similarly, could you put a huge boost
> on is_original in the dismax so that document matches on is_original
> score higher than those that aren't original? Or is your goal to not
> show generics *at all*?
> 
> 
> On Wed, Sep 12, 2012 at 2:47 PM, Walter Underwood <wunder@> wrote:
>> You may be able to do this with grouping. Group on the medicine "family",
>> and only show the Original if there are multiple items in the family.
>>
>> wunder
>>
>> On Sep 12, 2012, at 2:09 PM, Gustav wrote:
>>
>>> Hello everyone, I'm working on an e-commerce website and using Solr as
>>> my
>>> Search Engine, im really enjoying its funcionality and the search
>>> options/performance.
>>> But i am stucky in a kinda tricky cenario... That what happens:
>>>
>>> I Have  a medicine web-store, where i indexed all necessary products in
>>> my
>>> Index Solr.
>>> But when i search for some medicine, following my business rules, i have
>>> to
>>> verify if the result of my search contains any Original medicine, if
>>> there
>>> is any, then i wouldn't show the generics of this respective medicine,
>>> on
>>> the other hand, if there wasnt any original product in the result i
>>> would
>>> have to return its generics.
>>> Im currently returning the original and generics, is there a way to do
>>> this
>>> kind of "checking" in solr?
>>>
>>> Thanks! :)
> 
>>
> 

I have tought doing this Amit, but in this specific case,i would not be able
to show generics at all. a But i appreciate the help! 




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Is-it-possible-to-do-an-if-statement-in-a-Solr-query-tp4007311p4007468.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Is it possible to do an "if" statement in a Solr query?

2012-09-14 Thread Gustav
Hello Hoss!
The case here would be: "if total result set contains any original medicines
X, 
then remove all generic medicines Y such that Y is a generic form of X."

In your example and in my case, the result should be Vaxidrop + Generipill



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Is-it-possible-to-do-an-if-statement-in-a-Solr-query-tp4007311p4007853.html
Sent from the Solr - User mailing list archive at Nabble.com.


Stats field with decimal values

2012-09-17 Thread Gustav
Hello everyone,
When im using &stats=true&stats=product_price parameter, it returns me the
following structure:




1.0
1.0
7
0
7.0
7.0
1.0
0.0




What im looking for is these 2:
1.0
1.0
Is it possible to them be returned as decimal values?
Like this:
1.00
1.00

Tnks!



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Stats-field-with-decimal-values-tp4008292.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Stats field with decimal values

2012-09-17 Thread Gustav
Well, my client is asking if is it possible, im just providing the search
enginne to him, not working directly with the application. Dont know exactly
in what language he is programming.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Stats-field-with-decimal-values-tp4008292p4008395.html
Sent from the Solr - User mailing list archive at Nabble.com.


"&" char in querystring

2012-09-20 Thread Gustav
Good Morning Everyone!
Again, i need your help Lucene comunity! 
I have a query string just like this: q="johnson & johnson" and when i use
debugQuery=true i realize that the Solrparse breaks the string exactly in
the "&" char, changing my query to q="Johnson", i would like to know, is
there any way to avoid this?



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


Re: "&" char in querystring

2012-09-20 Thread Gustav
Hello Jack, 
My the fieldtype is configured as following:


  



  


What other filter could i use to preserve the "&" char?



Another problem that came up, is when i search for ?q="0,5%" it gives an
error:
HTTP Status 400 - missing query string

Probably because of the "%" char, is there any way to escape it?




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


Subqueries... using results from the main query

2012-10-30 Thread Gustav
Hello everyone,

i would like to know if it is possible to make a SUBQUERY inside my query
considering a field's current result of the main query in this subquery, 
Let me try to give a better explaination

I Have a simple query, something like this: /?q="1234"&qf=product_id, this
returns to me several fields, including:

14114 (this is the id of the related
product)
14115

I want to know if, in this same query, is possible to return the products
wich id are 14114 and 14115, instead of the normal results...

Thanks in advance, 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Subqueries-using-results-from-the-main-query-tp4017000.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Subqueries... using results from the main query

2012-11-01 Thread Gustav
Could you please explain what the "+" operator mean?
About the X and Y... i don't have the products_ids related to the results,
and i was expecting to make a subquery related to the ids returned from the
main query



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Subqueries-using-results-from-the-main-query-tp4017000p4017651.html
Sent from the Solr - User mailing list archive at Nabble.com.