Re: NPE in QueryComponent.mergeIds when using timeAllowed and sorting SOLR 8.7

2021-03-03 Thread Tomás Fernández Löbbe
Patch looks good to me. Since it's a bugfix it can be committed to 8_8 branch and released on the next bugfix release, though I don't think it should trigger one. In the meantime, if you can patch your environment and confirm that it fixes your problem, that's a good comment to leave in SOLR-14758.

Re: NPE in QueryComponent.mergeIds when using timeAllowed and sorting SOLR 8.7

2021-03-01 Thread Phill Campbell
Anyone? > On Feb 24, 2021, at 7:47 AM, Phill Campbell > wrote: > > Last week I switched to Solr 8.7 from a “special” build of Solr 6.6 > > The system has a timeout set for querying. I am now seeing this bug. > > https://issues.apache.org/jira/browse/SOLR-14758 >

NPE in QueryComponent.mergeIds when using timeAllowed and sorting SOLR 8.7

2021-02-24 Thread Phill Campbell
Last week I switched to Solr 8.7 from a “special” build of Solr 6.6 The system has a timeout set for querying. I am now seeing this bug. https://issues.apache.org/jira/browse/SOLR-14758 Max Query Time goes from 1.6 seconds to 20 seconds and aff

NPE in QueryComponent.mergeIds when using timeAllowed and sorting SOLR 8.7

2021-02-24 Thread Phill Campbell
Last week I switched to Solr 8.7 from a “special” build of Solr 6.6 The system has a timeout set for querying. I am now seeing this bug. https://issues.apache.org/jira/browse/SOLR-14758 Max Query Time goes from 1.6 seconds to 20 seconds and aff

Re: Ranking issue when combining sorting and re-ranking on SolrCloud (multiple shards)

2020-08-28 Thread Dmitry Kan
Hi Jörg, Thanks for this link -- one of our search engineers started looking into this, because the issue with sorting in a federated setting concerns non-LTR based ranking as well. In particular, it becomes visible in cursor based pagination in collections that have shards with replicas. At any

Re: Ranking issue when combining sorting and re-ranking on SolrCloud (multiple shards)

2020-08-28 Thread Dmitry Kan
solve the sorting/re-ranking issue. In the end we > migrated the custom sorting formula to using the 'q' param instead of > 'sort' to get back the results sorted by score as expected. > > That mostly solved our issues with inconsistent Solr scores. Maybe sorting > and r

Re: Ranking issue when combining sorting and re-ranking on SolrCloud (multiple shards)

2020-08-28 Thread Spyros Kapnissis
Hi Dmitry, No, we were not able to solve the sorting/re-ranking issue. In the end we migrated the custom sorting formula to using the 'q' param instead of 'sort' to get back the results sorted by score as expected. That mostly solved our issues with inconsistent Solr scores.

Re: Ranking issue when combining sorting and re-ranking on SolrCloud (multiple shards)

2020-08-28 Thread Jörn Franke
Maybe this can help you? https://lucene.apache.org/solr/guide/7_5/distributed-requests.html#configuring-statscache-distributed-idf On Mon, May 11, 2020 at 9:24 AM Spyros Kapnissis wrote: > HI all, > > On our current master/slave setup (no cloud), we use a a custom sorting > functio

Re: Ranking issue when combining sorting and re-ranking on SolrCloud (multiple shards)

2020-08-28 Thread Dmitry Kan
Hi Spyros, Did you manage to solve this issue and if yes, can you please share your solution? On Mon, May 11, 2020 at 10:24 AM Spyros Kapnissis wrote: > HI all, > > On our current master/slave setup (no cloud), we use a a custom sorting > function to get the first pass results (us

Re: Result set sorting bug

2020-08-20 Thread Erick Erickson
Why do you think that’s a bug? ShardDoc contains all sorts of interesting information, like positionInResponse. If your contention is that the results would not be ordered correctly, then I’d think someone would have noticed before this. Best, Erick > On Aug 20, 2020, at 6:33 AM, zjh1983314 w

Result set sorting bug

2020-08-20 Thread zjh1983314
hallo, i found a bug, in org.apache.solr.handler.component.QueryComponent line 989 . Map resultIds = new HashMap<>(); should Map resultIds = new LinkedHashMap(); thank you! zjh1983314

Re: Add custom comparator for field(s) for Sorting.

2020-08-07 Thread Erick Erickson
sorting the numerics lexically, and 100 would come before 2. A third alternative is to populate two separate fields, one numeric and one string then specify primary and secondary fields rather than one field, something like &sort string_field asc, numeric_field asc You’d have to pay attentio

Add custom comparator for field(s) for Sorting.

2020-08-07 Thread Pushkar Raste
Hi, Is it possible to add a custom comparator to a field for sorting. e.g. let's say I have field 'name' and following documents { id : "doc1", name : "1" } { id : "doc2", name : "S1" } { id : "doc2", name : "S2

Re: Question on sorting

2020-07-22 Thread Saurabh Sharma
Hi, It is because field is string and numbers are getting sorted lexicographically.It has nothing to do with number of digits. Thanks Saurabh On Thu, Jul 23, 2020, 11:24 AM Srinivas Kashyap wrote: > Hello, > > I have schema and field definition as shown below: > > omitNorms="true"/> > > > /

Question on sorting

2020-07-22 Thread Srinivas Kashyap
Hello, I have schema and field definition as shown below: TRACK_ID field contains "NUMERIC VALUE". When I use sort on track_id (TRACK_ID desc) it is not working properly. ->I have below values in Track_ID Doc1: "84806" Doc2: "124561" Ideally, when I use sort command, query result should

Re: sorting help

2020-07-15 Thread Dave
/too much”. > > That looks reasonable for alphatitle, but what about title? Your original > question was that the sorting changes depending on which field you > sort on. If your title field uses something that tokenizes or doesn’t > include the same analysis chain (particular

Re: sorting help

2020-07-15 Thread Erick Erickson
Yeah, it’s always a question “how much is enough/too much”. That looks reasonable for alphatitle, but what about title? Your original question was that the sorting changes depending on which field you sort on. If your title field uses something that tokenizes or doesn’t include the same analysis

Re: sorting help

2020-07-15 Thread David Hastings
hat the actual indexed tokens are. > > Both have the issue that I don’t know what tokenizer you are using. For > sorting it better be something > like KeywordTokenizer. Anything that breaks up the input into separate > tokens will produce surprises. > > And unless you have low

Re: sorting help

2020-07-15 Thread Erick Erickson
t know what tokenizer you are using. For sorting it better be something like KeywordTokenizer. Anything that breaks up the input into separate tokens will produce surprises. And unless you have lowercaseFilter in front of your patternreplace, you’re removing uppercase characters. Best, Erick &g

sorting help

2020-07-15 Thread David Hastings
t; to "alphatitle" that replaces all punctuation pattern: ([^a-z])replace: allclass: solr.PatternReplaceFilterFactory and if i use just title it flips: "title":"Finance, consolidation and rescheduling of debts"}, { "title":"Rights in former German Islands in

Re: Sorting in other collection in Solr 8.5.1

2020-06-24 Thread vishal patel
p://aka.ms/weboutlook> From: vishal patel Sent: Wednesday, June 24, 2020 1:33 PM To: solr-user@lucene.apache.org Subject: Re: Sorting in other collection in Solr 8.5.1 My listing looks like : https://drive.google.com/file/d/1Pw94topEJfarEA_P5JeiDOsHlvyACPK0/view ID

Re: Sorting in other collection in Solr 8.5.1

2020-06-24 Thread vishal patel
ot;project_id":"102579" } As of now one form has only one action but possible one form has many actions. For getting listing of project_id:102578, First we sort in ascending in actionscomments with field title so we get form_id in order 10252141 and 10252140. Base on that ord

Re: Sorting in other collection in Solr 8.5.1

2020-06-23 Thread Erick Erickson
You have two separate collections with dissimilar data, so what does “sorting them in the same order” mean? Your example sorts on title, so why can’t you sort them both on title? That won’t work of course for any field that isn’t identical in both collections. These are actually pretty small

Sorting in other collection in Solr 8.5.1

2020-06-22 Thread vishal patel
and action names. id,title,form created date and action names come from form collection and action names come from actionscomment collection. We want to give the sorting functionality for all columns.It is easy to sort id, title and form created date because it is in same collection. For action

Re: Sorting in other collection in Solr 8.5.1

2020-05-23 Thread Zheng Lin Edwin Yeo
t; We are showing form listing using form and actionscomment collection. We > are showing only 250 records in form listing page. Our form listing columns > are id,title,form created date and action names. id,title,form created date > and action names come from form collection and action names co

Sorting in other collection in Solr 8.5.1

2020-05-23 Thread vishal patel
and action names. id,title,form created date and action names come from form collection and action names come from actionscomment collection. We want to give the sorting functionality for all columns.It is easy to sort id, title and form created date because it is in same collection. For action

Re: Why Solr query time is more in case the searched value frequency is more even if no sorting is applied, for the same number of rows?

2020-05-15 Thread Paras Lehana
gt; P1 are X and with P2 are 2X (2 times X) respectively. If I query for R rows > for P1 and P2, the QTime in case of P2 is more. I am not specifying any > sort parameter and the number of rows I'm asking for is same in both the > cases so why such difference? > > I understand tha

Re: multiple sort terms in json facets sorting

2020-05-13 Thread ART GALLERY
check out the videos on this website TROO.TUBE don't be such a sheep/zombie/loser/NPC. Much love! https://troo.tube/videos/watch/aaa64864-52ee-4201-922f-41300032f219 On Wed, May 13, 2020 at 7:56 AM Saurabh Sharma wrote: > > Hi All, > > I am trying to use two sorting criteria wit

multiple sort terms in json facets sorting

2020-05-13 Thread Saurabh Sharma
Hi All, I am trying to use two sorting criteria with json facets but found that only one of them is working and other one is not getting honoured. sort:{ sortingScore:desc , x:desc} , Here only sortingScore is being used by solr and parameter x is ignored . Is there any way using which I can use

Ranking issue when combining sorting and re-ranking on SolrCloud (multiple shards)

2020-05-11 Thread Spyros Kapnissis
HI all, On our current master/slave setup (no cloud), we use a a custom sorting function to get the first pass results (using the sort param), and then we use LTR for re-ranking. This works fine, i.e. re-ranking is applied on the topN, after sorting has completed and the order is correct

Why Solr query time is more in case the searched value frequency is more even if no sorting is applied, for the same number of rows?

2020-05-10 Thread Anshuman Singh
h the cases so why such difference? I understand that if I use sorting on some basis then it has to go through all the documents and then apply sorting on them before providing the requested rows. But without sorting can't it just read the first R documents from the index? In this case, I believe

Re: edge ngram/find as you type sorting

2020-03-26 Thread Erick Erickson
From other mails, it looks like you’re inheriting something you had no input in building. My sympathies ;) Unless you’ve explicitly changed the memory by specifying -Xmx and -Xms at startup, you’re operating with 512M of memory, which is far too small for most Solr installations. the -m parameter

Re: edge ngram/find as you type sorting

2020-03-26 Thread matthew sporleder
That explains the OOM's I've been getting in the initial test cycle. I'm working with about 50M (small) documents. On Thu, Mar 26, 2020 at 7:58 AM Erick Erickson wrote: > > the ngramming is a time/space tradeoff. Typically, > if you restrict the wildcards to have three or more > “real” characters

Re: edge ngram/find as you type sorting

2020-03-26 Thread Erick Erickson
the ngramming is a time/space tradeoff. Typically, if you restrict the wildcards to have three or more “real” characters performance is fine. One real character (i.e. a*) will be your worst-case. I’ve seen requiring two characters in the prefix work well too. It Depends (tm). Conceptually what hap

Re: edge ngram/find as you type sorting

2020-03-25 Thread matthew sporleder
Okay confirmed- I am getting a more predictable results set after adding an additional field: q=slug:what_is_lo*&fl=slug&rows=1000&wt=csv&sort=slug_alpha%20asc So it appears I can skip edge ngram entirely using this method as slug:foo* appears to

Re: edge ngram/find as you type sorting

2020-03-25 Thread Erick Erickson
You’re getting the correct sorted order… The underscore character is confusing you. It’s ascii code for underscore is %2d which sorts before any letter, uppercase or lowercase. See the alphaOnlySort type for a way to remove this, although the output there can also be confusing. Best, Erick >

Re: edge ngram/find as you type sorting

2020-03-25 Thread matthew sporleder
n_Spanish What_is_lovage What_is_Lovagny's_population What_is_lovan_for What_is_lovanox What_is_lovarstan_for What_is_Lovasatin On Wed, Mar 25, 2020 at 1:15 PM Erick Erickson wrote: > > What _is_ happening? Please provide examples of the inputs > and outputs that don’t work for you. ‘cau

Re: edge ngram/find as you type sorting

2020-03-25 Thread Erick Erickson
What _is_ happening? Please provide examples of the inputs and outputs that don’t work for you. ‘cause the sort order should be “nothing comes before something" so sorting ascending on a keywordtokenizer+lowecasefilter should give you exactly what you’re asking for with no need for a length

Re: edge ngram/find as you type sorting

2020-03-25 Thread matthew sporleder
My original goal was to avoid indexing the string length because I wanted edge ngram to "score" based on how "exact" the match was: q=abc "abc" has a high score "abcd" has a lower score "abcde" has an even lower score You say sorting by by the

Re: edge ngram/find as you type sorting

2020-03-25 Thread Erick Erickson
Why do you want to deal with score at all? Sorting overrides score-based sorting. Well, unless you specify score as a secondary sort. But since you’re sorting by length anyway, trying to score based on proximity to the end does nothing. The weirdness you’re going to get here, though, is that the

Re: edge ngram/find as you type sorting

2020-03-25 Thread matthew sporleder
Where I landed: --- I can then do a search for q=fayt:my_article_slu&sort=qt_len asc to get the shortest/most exact find-as-you-type match. I couldn't get around all results having the same score (can I boost pr

Re: edge ngram/find as you type sorting

2020-03-24 Thread matthew sporleder
Okay I appreciate you responding. Switching "slug" from "string_ci" class="solr.StrField" accomplished about the same results, which makes sense to me now :) The previous definition of string_ci was: So lowercase + KeywordTokenizerFactory; I am trying aga

Re: edge ngram/find as you type sorting

2020-03-24 Thread Erick Erickson
Won’t work. String types are totally unanalyzed. Your string_ci fieldType is what I was looking for. No, you shouldn’t kill the lowercasefilter unless you want all of your searches will then be case-sensitive. So you should try: q=edgy_text:whatever&sort=string_ci asc Please use the admin>>pi

Re: edge ngram/find as you type sorting

2020-03-24 Thread matthew sporleder
Oh maybe a schema bug! my string_ci: going to try this instead: Then I can probably kill the lowercasefilter on edgeytext: On Tue, Mar 24, 2020 at 7:44 AM Erick Erickson wrote: > > Sort by the full field. You’ll n

Re: edge ngram/find as you type sorting

2020-03-24 Thread Erick Erickson
Sort by the full field. You’ll need to copy to a field with keywordTokenizer and lowercaseFilter (string_ci? assuming it’s not really a :”string”) type. Best, Erick > On Mar 24, 2020, at 7:10 AM, matthew sporleder wrote: > > I have added an edge ngram field to my index and get decent results >

edge ngram/find as you type sorting

2020-03-24 Thread matthew sporleder
I have added an edge ngram field to my index and get decent results with partial words but the results appear randomly sorted and all contain the same score. Ideally I would like to sort by shortest ngram match within my other qualifiers. Is there a canonical solution to this? Thanks, Matt p.s.

Re: Sorting on an empty filter

2020-03-11 Thread Stephen Lewis Bianamara
query where the filter query returns an empty set but there is a sort > associated with it, the query takes an extended time to execute over the > query with only the filter query and no sort associated to it. This > suggests to me that SOLR is sorting in parallel with or even before the &

Sorting on an empty filter

2020-03-03 Thread Stephen Lewis Bianamara
to it. This suggests to me that SOLR is sorting in parallel with or even before the filter query. However, it seems to me like the query should generally filter first and then sort, or perhaps have an option to do so. I don't currently see any way of making that happen. What motivates my questio

Re: sorting groups on the basis of average of a field in documents

2020-01-13 Thread Saurabh Sharma
Hi Erick, I am using json facets and was able to achieve desired result using them. I was looking for some possibilities for same in groups. Doing it using json facets is last option. Thank Saurabh Sharma On Mon, Jan 13, 2020, 7:17 PM Erick Erickson wrote: > This might help: > https://lucene

Re: sorting groups on the basis of average of a field in documents

2020-01-13 Thread Erick Erickson
This might help: https://lucene.apache.org/solr/guide/7_4/json-facet-api.html basically, if you can construct facets that correspond to your groups, you can do some statistical functions on them. Best, Erick > On Jan 13, 2020, at 2:18 AM, Saurabh Sharma > wrote: > > Hi All, > > I have a requ

sorting groups on the basis of average of a field in documents

2020-01-12 Thread Saurabh Sharma
Hi All, I have a requirement where I need to sort the group on average of a particular field. The motive here is to compute the average of the value of a field across all documents of the group and then sort the group on the basis of commuted average. Is there any approach that can be used to sol

Re: Grouping and sorting Together

2019-11-14 Thread Paras Lehana
Hi Neo, Please mention the expected result as well. Do you want to sort "item sold" group wise or result wise? Use sort for the former while group.sort

Grouping and sorting Together

2019-11-14 Thread neotorand
Hi List I need your help to resolve a problem for which i had been struggling for days. Lets take an example of Shoes which are grouped on basis of size and Price With first group as size and price as "7 and 7000" i have 2 documents as below {id:1,color:blue,item sold:10} {id:5,price:yellow,item

Inaccuracies sorting by payload value

2019-10-22 Thread André Widhani
I have a problem when sorting by payload value ... the resulting sort order is correct for some documents, but not all. The field type and field definitions are as follows: The request parameters are the following: _exact_utag_primary_id:utag77n5840c6h5v0g9b9ww _id

Re: solr UI collection dropdown sorting order

2019-10-21 Thread Sotiris Fragkiskos
Hi everyone! > >>> > >>> is there any way the collections available on the left-hand side of the > >>> solr UI can be sorted? I'm referring to the "collection selector" > >> dropdown. > >>> But the same applies to the Collecti

Re: solr UI collection dropdown sorting order

2019-10-21 Thread Erick Erickson
2019 09:06, Sotiris Fragkiskos wrote: >>> Hi everyone! >>> >>> is there any way the collections available on the left-hand side of the >>> solr UI can be sorted? I'm referring to the "collection selector" >> dropdown. >>> But the sa

Re: solr UI collection dropdown sorting order

2019-10-21 Thread Sotiris Fragkiskos
referring to the "collection selector" > dropdown. > > But the same applies to the Collections button. > > The sorting seems kind of..random? > > > > Thanks in advance! > > > > Sotir > > > > -- > Charlie Hull > Flax - Open Source Enterprise Search > > tel/fax: +44 (0)8700 118334 > mobile: +44 (0)7767 825828 > web: www.flax.co.uk > >

Re: solr UI collection dropdown sorting order

2019-10-21 Thread Charlie Hull
wrote: Hi everyone! is there any way the collections available on the left-hand side of the solr UI can be sorted? I'm referring to the "collection selector" dropdown. But the same applies to the Collections button. The sorting seems kind of..random? Thanks in advance! Sotir -- Ch

Re: solr UI collection dropdown sorting order

2019-10-21 Thread Sotiris Fragkiskos
ere any way the collections available on the left-hand side of the > > solr UI can be sorted? I'm referring to the "collection selector" > dropdown. > > But the same applies to the Collections button. > > The sorting seems kind of..random? > > > > Thanks in advance! > > > > Sotir > >

Re: solr UI collection dropdown sorting order

2019-10-20 Thread Erick Erickson
ere any way the collections available on the left-hand side of the > solr UI can be sorted? I'm referring to the "collection selector" dropdown. > But the same applies to the Collections button. > The sorting seems kind of..random? > > Thanks in advance! > > Sotir

solr UI collection dropdown sorting order

2019-10-20 Thread Sotiris Fragkiskos
Hi everyone! is there any way the collections available on the left-hand side of the solr UI can be sorted? I'm referring to the "collection selector" dropdown. But the same applies to the Collections button. The sorting seems kind of..random? Thanks in advance! Sotir

Re: Sorting based on Date and Name combination in Solr 6.2

2019-07-10 Thread Santosh Kumar S
out at any other probable solution. Thank you once again and I appreciated your reply, I will definitely consider your solution. Shawn Heisey-2 wrote > On 7/10/2019 7:22 AM, Santosh Kumar S wrote: >> When we try sorting it, then the records are getting sorted based on >> Ti

Re: Sorting based on Date and Name combination in Solr 6.2

2019-07-10 Thread Santosh Kumar S
Thank you Shawn for your prompt response. However we have that option open of having a separate date only field or a separate field with date along with default Timestamp like you mentioned (00:00:00.000). But this change shall need a full-import or full crawl, as we lot many data, we looking out a

Re: Sorting based on Date and Name combination in Solr 6.2

2019-07-10 Thread Shawn Heisey
On 7/10/2019 7:22 AM, Santosh Kumar S wrote: When we try sorting it, then the records are getting sorted based on Timestamp, but we need to sort only on date part keeping timestamp part aside. That is how sorting on a field that has a timestamp is going to work. It will always use the whole

Sorting based on Date and Name combination in Solr 6.2

2019-07-10 Thread Santosh Kumar S
Hi, We have a scenario where we need to sort on Date and Name combination. We have a Date field of type DateTime and a Name field. When we try sorting it, then the records are getting sorted based on Timestamp, but we need to sort only on date part keeping timestamp part aside. Here is an

Issues with calculating metrics and sorting on a float field in a stream

2019-06-07 Thread Oleksandr Chornyi
Hi guys! I bumped into a couple of issues when trying to sort a stream or calculate metrics on a Float field which contains values without the decimal part (e.g 1.0, 0.0, etc.). 1. Issues with sorting. Consider this expression: > sort( > list( >tuple(a=val(1.0)), >

Using solrconfig for json facet sorting

2019-04-11 Thread sagandhi
Hi, Is it possible to configure sorting on json.facet in solrconfig.xml just like for traditional facets? Thanks, Soham -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: edismax: sorting on numeric fields

2019-02-17 Thread Nicolas Paris
on* in the below example). So *sorting* looks not sufficient. After playing around with distance functions it turns out this one looks quite sufficient: ?defType=edismax&q=kind:animal&carnivore&qf=description^3&boost=div(1,abs(sub(weight,50))) this means: "give me all animals hav

Re: edismax: sorting on numeric fields

2019-02-17 Thread Jan Høydahl
ort by numeric fields, instead, I d'like to >> get sort by distance to my query. >> >> >>> On Thu, Feb 14, 2019 at 06:20:19PM -0500, Gus Heck wrote: >>> Hi Niclolas, >>> >>> Solr has no difficulty sorting on numeric fields if they are i

Re: edismax: sorting on numeric fields

2019-02-16 Thread Dave
019, at 10:10 AM, Nicolas Paris wrote: > > Hi > > Thanks. > To clarify, I don't want to sort by numeric fields, instead, I d'like to > get sort by distance to my query. > > >> On Thu, Feb 14, 2019 at 06:20:19PM -0500, Gus Heck wrote: >> Hi Niclolas,

Re: edismax: sorting on numeric fields

2019-02-16 Thread Erick Erickson
s. > To clarify, I don't want to sort by numeric fields, instead, I d'like to > get sort by distance to my query. > > > On Thu, Feb 14, 2019 at 06:20:19PM -0500, Gus Heck wrote: > > Hi Niclolas, > > > > Solr has no difficulty sorting on numeric fields if th

Re: edismax: sorting on numeric fields

2019-02-16 Thread Nicolas Paris
Hi Thanks. To clarify, I don't want to sort by numeric fields, instead, I d'like to get sort by distance to my query. On Thu, Feb 14, 2019 at 06:20:19PM -0500, Gus Heck wrote: > Hi Niclolas, > > Solr has no difficulty sorting on numeric fields if they are indexed as a >

Re: edismax: sorting on numeric fields

2019-02-14 Thread Gus Heck
Hi Niclolas, Solr has no difficulty sorting on numeric fields if they are indexed as a numeric type. Just use "&sort=weight asc" If you're field is indexed as text of course it won't sort properly, but then you should fix your schema. -Gus On Thu, Feb 14, 2019 at 4:10

Re: edismax: sorting on numeric fields

2019-02-14 Thread David Hastings
Not clearly understanding your question here. if your query is q=kind:animal weight:50 you will get no results, as nothing matches (assuming a q.op of AND) On Thu, Feb 14, 2019 at 4:06 PM Nicolas Paris wrote: > Hi > > I have a numeric field (say "weight") and I d'like to be able to get > resul

edismax: sorting on numeric fields

2019-02-14 Thread Nicolas Paris
Hi I have a numeric field (say "weight") and I d'like to be able to get results sorted. q=kind:animal weight:50 pf=kind^2 weight^3 would return: name=dog, kind=animal, weight=51 name=tiger, kind=animal,weight=150 name=elephant, kind=animal,weight=2000 In other terms how to deal with numeric fie

Re: 6.3 -> 6.4 Sorting responseWriter renamed

2019-01-11 Thread Raveendra Yerraguntla
Hi Joel, Thanks for the quick response. Our current usage is below. Could you guide me in using the new class and write method.  public class customSearchHandler extends SearchHandler {@Override public void inform(SolrCore core) {    super.inform(core); ….  core.registerResponseWriter("xsort

Re: 6.3 -> 6.4 Sorting responseWriter renamed

2019-01-11 Thread Joel Bernstein
The functionality should be exactly the same. The config files though need to be changed. I would recommend adding any custom configs that you have to the new configs following the ExportWriter changes. Joel Bernstein http://joelsolr.blogspot.com/ On Thu, Jan 10, 2019 at 11:21 AM Raveendra Yerr

6.3 -> 6.4 Sorting responseWriter renamed

2019-01-10 Thread Raveendra Yerraguntla
Hello All, In 6.4 (Solr-9717)  SortingResponseWriter is renamed to ExportWriter and moved to a different package. For migrating to higher Solr (post 6.4) versions, I  need to help with compatible functionalities. Application is using  SortingResponseWriter in the searcher handlers inform method

Not able to perform case insensitive sorting with SortableTextField

2018-12-12 Thread Ritesh Kumar
Hello Team, I am facing a problem with sorting on a field with type as mentioned below The field may contain numerical as well as alphabetical values. My Solr version is 7.5.0. If I sort by "fieldName desc", this field sorts lowerc

Re: Sorting of solr.CurrencyFieldType in 7.3.1

2018-10-30 Thread Erick Erickson
ou, let us know. But note you need to show us the _entire_ return header to allow anyone to diagnose the problem. Best, Erick On Tue, Oct 30, 2018 at 5:59 AM Chris Gerke wrote: > > UNSUBSCRIBE > > On Tue, 30 Oct 2018 at 8:24 pm, Stefan Kuhn wrote: > > > Hi, > > >

Re: Sorting of solr.CurrencyFieldType in 7.3.1

2018-10-30 Thread Chris Gerke
UNSUBSCRIBE On Tue, 30 Oct 2018 at 8:24 pm, Stefan Kuhn wrote: > Hi, > > last week I found an error in the result sorting regarding a field of the > type "solr.CurrencyFieldType" in solr version 7.3.1. > > There are multiple documents which I must sort with this f

Sorting of solr.CurrencyFieldType in 7.3.1

2018-10-30 Thread Stefan Kuhn
Hi, last week I found an error in the result sorting regarding a field of the type "solr.CurrencyFieldType" in solr version 7.3.1. There are multiple documents which I must sort with this field, but the order of the result is apparently not correctly sorted after the sorting

Re: Sorting multi-valued fields

2018-09-14 Thread Shawn Heisey
On 9/14/2018 4:50 AM, richard.clarke wrote: What does it mean to sort documents by a multivalued field? If a field has multiple values, how can this be used to sort documents? e.g. if document 1 has a numeric field containing values 1,2,3,4,5 and document 2 has values in the same field of 1,2,3

Re: Sorting multi-valued fields

2018-09-14 Thread Mikhail Khludnev
http://people.apache.org/~mkhl/searchable-solr-guide-7-3/common-query-parameters.html#sort-parameter In the case of primitive fields, or SortableTextFields, that are multiValued="true" the representative value used for each doc when sorting depends on the sort direction: The minimum val

Sorting multi-valued fields

2018-09-14 Thread richard.clarke
Hi What does it mean to sort documents by a multivalued field? If a field has multiple values, how can this be used to sort documents? e.g. if document 1 has a numeric field containing values 1,2,3,4,5 and document 2 has values in the same field of 1,2,3 - which come first in the sort order and w

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Erick Erickson
OK, you just don't want to group as Shawn says. The group.main=true just flattens the list but still returns the docs in groups does all the work of grouping. So instead of getting value=1 [ doc31 doc64 ] value=2 [ doc 98 doc 6 ] you get doc31 doc64 doc98 doc6 Best, Erick On Tue,

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Shawn Heisey
On 9/11/2018 12:00 PM, Venkateswarlu Bommineni wrote: What i am expecting is (it might be silly) if i put group.main=true and sort by price then the results are: { "priceValueGLP_usd_double":32015.0, "sapRank_int":446}, { "priceValueGLP_usd_double":32015.

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Venkateswarlu Bommineni
Erik and Shawn, Sorry for the confusion. Yes Solr is sorting inside the grouped results.but not on all the results. Example : we have got 6 records by solr response. if i do *sort=price desc , it is sorting indise each group.* *But the requirement is to sort on all the results.* *Current

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Erick Erickson
e find the resonse and query when grouping and sorting by rank : > > I see no evidence of grouping happening in either of those responses. > They look like standard responses do when grouping is not enabled. > > Here's an example of a grouped result from the techproducts examp

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Shawn Heisey
On 9/11/2018 10:14 AM, Venkateswarlu Bommineni wrote: Please find the resonse and query when grouping and sorting by rank : I see no evidence of grouping happening in either of those responses.  They look like standard responses do when grouping is not enabled. Here's an example

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Venkateswarlu Bommineni
Please find the resonse and query when grouping and sorting by rank : http://localhost:8983/solr/master_shaneco_Product_flip/select?indent=on&q=rank:[1%20TO%20*]&wt=json&group=true&group.main=true&group.field=rank&rows=50&fl=code_String,price,rank&sort=rank+asc&a

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Erick Erickson
s. > > So on products listing page, by default we will group on rank and show 3 > products for each group and sort based on Rank. > > But Customers can sort on price too. If they do sorting on price then > sorting is happening inside group instead of all the records. > > But the

Re: group.limit>1 and sorting is not working as expected

2018-09-10 Thread Venkateswarlu Bommineni
Customers can sort on price too. If they do sorting on price then sorting is happening inside group instead of all the records. But the requirement is to sort on all the results we show to the customer. Query for grouping : https://localhost/solr/master_shaneco_Product_flip/select?indent=on&q=

Re: group.limit>1 and sorting is not working as expected

2018-09-10 Thread Erick Erickson
bq. I just wanted to know if there is any attribute which says sort on all the document list instead of relative to group results. I really don't know what you want here. "sort on all the document list" seems like just sorting without grouping. >From that problem statemen

Re: group.limit>1 and sorting is not working as expected

2018-09-10 Thread Venkateswarlu Bommineni
d= > > > rank_int&group.limit=3&q=*&fl=code_string,sapRank_int,price&sort=price+desc > > > > I am grouping on field *rank_int with group limit>3 and doing the sorting > > on price. sorting is happening inside the group not on whole records.* >

Re: group.limit>1 and sorting is not working as expected

2018-09-08 Thread Shawn Heisey
ouping on field *rank_int with group limit>3 and doing the sorting on price. sorting is happening inside the group not on whole records.* You need to find the right combination of sort and group.sort parameters. https://lucene.apache.org/solr/guide/6_6/result-grouping.html#ResultGrouping-RequestParameters Thanks, Shawn

group.limit>1 and sorting is not working as expected

2018-09-08 Thread Venkateswarlu Bommineni
Hello Solr Experts, I am facing an weird issue. where if i have put group.limit>1 then sorting is not working as expected. Query ; https:///solr/default/select?fq=rank_int:[1%20TO%20*]&indent=on&wt=json&group=true&group.main=true&group.field= rank_int&group.limit=3&

Re: Sorting by custom order

2018-09-01 Thread Walter Underwood
Use a enum field. Those are designed to map arbitrary values to a sort order. The standard example is to apply an order to something that isn’t alpha like: Error, Warning, Info. https://lucene.apache.org/solr/guide/6_6/working-with-enum-fields.html Enums convert an ordered set into a numeric sort

Re: Sorting by custom order

2018-09-01 Thread Shawn Heisey
On 9/1/2018 12:36 AM, Salvo Bonanno wrote: I need to sort a results set in a particolar way... the documents looks like this: There are two problems with what you want and your setup. I need to sort them by profile_txt value (it's a multiValue field but actually it contains just a single valu

Sorting by custom order

2018-08-31 Thread Salvo Bonanno
Hello I need to sort a results set in a particolar way... the documents looks like this: { "customer_id":28998, "name_txt":["Equal Corp"], "address_txt":["Austin Ring Center"], "municipality_txt":["Austin"], "province_txt":["Austin"], "region_txt":["TX"], "profile_txt"

  1   2   3   4   5   6   7   8   9   10   >