mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 15:40:58 +00:00
1 line
3.5 KiB
JSON
1 line
3.5 KiB
JSON
[{"user_id": 3580, "stars": [], "topic_id": 40800, "date_created": 1309403648.478653, "message": "Very new to haystack/solr (switching from Sphinx).. One of the first things I've noticed is that when ordering by one of my fields (a simple 'full name' field) the results don't seem to make sense. Initially I thought maybe the problem was that the field was being tokenized and the tokens were being evaluated independently of the entire list.. but I replaced-in underscores for the spaces and still see results that aren't making sense to me. The solr & haystack docs didn't seem to shed light on the subject, but I'm sure I'm missing something obvious.. Any haystack/solr people that can give me a nudge in the right direction?", "group_id": 81, "id": 1525018}, {"user_id": 32294, "stars": [], "topic_id": 40800, "date_created": 1309416620.8015449, "message": "Please be more specific.", "group_id": 81, "id": 1526248}, {"user_id": 3580, "stars": [], "topic_id": 40800, "date_created": 1309451220.1980591, "message": "@frankbieniek Sure, sorry.. for instance.. when I order by full name ascending right now, here is the beginning of the list I'm returned:", "group_id": 81, "id": 1529405}, {"user_id": 3580, "stars": [], "topic_id": 40800, "date_created": 1309451243.7315209, "message": "[u'Banana M Tuna', u'Mickey Mouse', u'New Person', u'Supa Clean', u'Sumpin Special', u'Bird TEST100073473 Flintstone ', u'Tracy TEST100335617 Pluto', u'Woodstock TEST100466689 Astro', u'Marmaduke TEST100532225 Lucy'", "group_id": 81, "id": 1529412}, {"user_id": 3580, "stars": [], "topic_id": 40800, "date_created": 1309472473.631561, "message": ">>> [(i.pk, i.full_name) for i in SearchQuerySet().models(Person).order_by('full_name')]\n[('17891329', u'Zzzzz Zzz'), ('25100289', u'Aaaaa Aaa'), ('33685505', u'Sssss Sss')]\n>>> [(i.pk, i.full_name) for i in SearchQuerySet().models(Person).order_by('-full_name')]\n[('33685505', u'Sssss Sss'), ('25100289', u'Aaaaa Aaa'), ('17891329', u'Zzzzz Zzz')]\n", "group_id": 81, "id": 1534478}, {"user_id": 3580, "stars": [], "topic_id": 40800, "date_created": 1309472472.70223, "message": "or more conclusively:", "group_id": 81, "id": 1534476}, {"user_id": 3580, "stars": [], "topic_id": 40800, "date_created": 1309472521.8085451, "message": "actually that looks like pk order.. interesting.", "group_id": 81, "id": 1534482}, {"user_id": 37444, "stars": [], "topic_id": 40800, "date_created": 1309725495.733835, "message": "is full_name indexed?", "group_id": 81, "id": 1553974}, {"user_id": 3580, "stars": [], "topic_id": 40800, "date_created": 1309882208.639209, "message": "@davidesousa you mean, was it a field that was included in the index? yep. It was a prepare_'d field.. since full_name isn't actually a field on my Django model. For I dunno what reason, indexing first, middle, and last names separately and sorting accordingly worked.. so I switched to doing that for the time being. Still have no idea why the full_name field was sorting strangely.", "group_id": 81, "id": 1568412}, {"user_id": 37444, "stars": [], "topic_id": 40800, "date_created": 1309963273.359015, "message": "@phill can you post somewhere the search_indexes.py where the SearchIndex is, the field must be indexed=true, but if it's text type, you must take some precautions.", "group_id": 81, "id": 1575904}, {"user_id": 16627, "stars": [], "topic_id": 40800, "date_created": 1316091007.139493, "message": "If I remember correctly solr/lucene can't sort on tokenized fields. Did you find a solution to this in the end?", "group_id": 81, "id": 2133542}] |