prefix/suffix lists and question-marks don't play nicely together
Aperta
Nessuno ha ancora preso questa issue.
auto-migrated
Priority-Medium
Type-Defect
- Lingua principale
- Go
- Stelle
- 4k
- Fork
- 404
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
One of the areas I got stuck on when debugging the trigram-question-mark issue,
but might actually be a fundamental design limitation / feature, is that moving
to prefix/suffix lists can cause the list of trigrams to drop considerably.
bash$ ./csearch -verbose 'foo_(bar)?zot' >/dev/null
2012/03/07 22:18:48 query: "foo" "oo_" "zot" ("_zo" "o_z")|("arz" "rzo")
2012/03/07 22:18:48 post query identified 0 possible files
bash$ ./csearch -verbose 'foo_(bar_)?zot' >/dev/null
2012/03/07 22:18:53 query: "foo" "oo_" "zot"
2012/03/07 22:18:53 post query identified 0 possible files
In the first case, "bar" is only three characters and stays as an exact trigram
and is used to construct the arz/rzo entries. When it becomes a prefix/suffix
list (when it hits 4 characters by adding the underscore), it no longer
provides us with any trigram info because the empty string empties out the
prefix and suffix lists as being "redundant" with the empty string. ("" is a
prefix of "ba").
I'm not sure if this is a bug or not. I.e, _should_ we be able to transform
prefix/suffix lists into AND/OR sets of trigrams in this case?
Original issue reported on code.google.com by dgryski on 7 Mar 2012 at 10:08
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo le due query ./csearch -verbose mostrate nell’issue e confronta il loro output dei trigrammi e il conteggio dei file possibili. Traccia la gestione delle query per gli elenchi di prefissi/suffissi e i punti interrogativi; il lavoro è completato quando si è deciso e implementato se tali elenchi possono preservare un numero sufficiente di vincoli sui trigrammi senza eliminare erroneamente le corrispondenze.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- go
- Ambito
- search
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100