@@ -12,6 +12,7 @@
12 +$ state-0
12 +$ state-0
15 =phonetics:s
16 =phonetics:s
17 =directory:s
18 =directory:s
@@ -183,7 +184,7 @@
183 %- get-listings
184 %- get-listings
184 %- get-hashes
185 %- get-hashes
185 %- sort-entries
186 %- sort-entries
186− (get-entries term)
187+ (~(get-entries delver [lookup trigrams phonetics]) term)
187 |= =listing:s
188 |= =listing:s
188 |(=(filter %all) =(filter type.post.listing))
189 |(=(filter %all) =(filter type.post.listing))
189 =/ listings (swag [start limit] all)
190 =/ listings (swag [start limit] all)
@@ -194,62 +195,6 @@
194 (lent all)
195 (lent all)
200− =/ title (norm:sift key) :: full query
201− =/ parts (sift:sift key) :: split query
205− (get-phonetics title)
206− (~(gut by lookup) title *(list entry:s))
209− %~ uni by :: union and prefer title entries (better rank)
217− (get-phonetics word)
218− (~(gut by lookup) word *(list entry:s))
228− (~(gut by phonetics) (utter:m key) *(set key:s))
233− |= [word=key:s entries=(list entry:s)]
237− (~(gut by lookup) word *(list entry:s))
241− |= [=entry:s offset=@ud]
242− [hash.entry (add rank.entry offset)] :: phonetically similar should be lower
244− |= entries=(list entry:s)
246− |= [a=entry:s b=entry:s]
249− |= entries=(list entry:s)
252− |=(=entry:s hash.entry)
253++ get-listings
198++ get-listings
254 |= l=(list hash)
199 |= l=(list hash)
255 %+ turn l
200 %+ turn l
@@ -293,6 +238,20 @@
293 |= [=key:s value=(list entry:s)]
238 |= [=key:s value=(list entry:s)]
294 ?. (~(has by entries) key) value
239 ?. (~(has by entries) key) value
295 (weld value (~(got by entries) key))
240 (weld value (~(got by entries) key))
247+ %+ turn (iching key)
249+ [trigram (silt ~[key])]
251+ |= [next=trigrams:s t=trigrams:s]
252+ %- (~(uno by t) next)
253+ |= [k=key:s v=(set key:s) w=(set key:s)]
296 =. phonetics
255 =. phonetics
298 %- ~(uno by phonetics)
257 %- ~(uno by phonetics)