# La ricerca dell'ordine sembra essere rotta durante la ricerca nell'argomento

**URL:** https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303
**Category:** Bug
**Tags:** search, fixed
**Created:** [16 Giugno 2024, 9:54pm UTC](https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303 "2024-06-16T21:54:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [16 Giugno 2024, 9:54pm UTC](https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303/1 "2024-06-16T21:54:16Z")

</div>

Guardando la [mappa degli argomenti](https://meta.discourse.org/t/feedback-on-our-simplified-topic-map-experiment/307584) di [DiscoTOC - automatic table of contents - #438 by fbpbdmin](https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143/438), ho notato che qualcosa non va con le risposte più apprezzate.

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/4/5/d455025f208da7ebce4561d39e1802f1420c5656.png)  
Il post più apprezzato mostrato ha 6 mi piace, ma anche l’ultimo ne ha 7.

Poi ho provato a trovare i tre post più apprezzati cercando ordinati per mi piace, ma anche questo non ha funzionato. I risultati non erano assolutamente i post più apprezzati. Il secondo risultato era un piccolo post d’azione, molto improbabile che fosse uno dei post più apprezzati. Poi ho notato che l’ordine era lo stesso di quando sceglievo pertinenza, più visti o ultimo argomento.  
[Link di esempio per la ricerca](https://meta.discourse.org/search?q=topic%3A111143%20%23theme-component%20order%3Alikes)  
**Modifica: Sembra che i post siano sempre ordinati come appaiono nell’argomento.**

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/1/7/a17f1d6292e36ae153a91d88aa83089990b810b7.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/d/1/a/d1afa8aa4df94faf948c1c786773bf8135a53c69.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/5/d/1/5d1c3853fb61b0cc85e71a4308f51c6226e88884.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/5/3/1/5316eae2f0ebb2abe30de20bcb6670688960e86e.png)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [26 Giugno 2024, 1:26pm UTC](https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303/2 "2024-06-26T13:26:20Z")

</div>

Sì, penso che la tua analisi sia corretta. Limitiamo i risultati ai primi 50 post, quindi qualsiasi argomento con più di 50 post avrà una classifica errata se un post dopo il 50° post ha più like di uno dei primi 50 post.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [27 Giugno 2024, 3:53pm UTC](https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303/4 "2024-06-27T15:53:03Z")

</div>

Grazie mille per il lavoro investigativo 🕵️‍♀️ @Moin

Stavamo effettivamente sovrascrivendo l’“ordine di ricerca” durante la ricerca di un argomento specifico.

Questo verrà corretto da 👇

> <https://github.com/discourse/discourse/pull/27634>
>
> When using the full page search and filtering down to a specific topic, the sort… order was overwritten to by by "post\_number".
> 
> This was confusing because we allow different type of sort order in the full search page.
> 
> This fixes it by only sorting by post\_number when there's no "global" sort order defined.
> 
> Since the "new topic map" uses the search endpoint behind the scene, this also fixes the "most likes" popup.
> 
> Context - https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [29 Giugno 2024, 7:17am UTC](https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303/6 "2024-06-29T07:17:49Z")

</div>


