"Prior Searches" list

I’m seeing something that I assume is unintended in the Prior Searches list.

I’ve typed in a search (who:“Bill Nye” and who:“Mister Wizard”), and it eventually showed me the results. However, when I returned to the search page later, I see the following in the Prior Searches list:

  • who:"Bill Nye
  • who:"Bill
  • who:"Bill
  • who:“Bill Nye” and who:"Mister Wizard
  • who:“Bill Nye” and who:“Mister Wizard”
  • who:"Bill Nye
  • who

Not a big problem, but wanted to report it!

1 Like

It shouldn’t be adding queries that result in no assets: most of those have unmatched quotes…

Thanks for reporting this!

Also

2 Likes

What would be a good set of saved queries, in this case? Should it only remember

  • who:“Bill Nye”
  • who:“Bill Nye” and who:“Mister Wizard”

?

Also: I never thought of testing unbalanced quotes, thanks for highlighting that.

In my opinion, it should only remember the executed search, not a subset of the executed search. So if it only remembers

  • who:“Bill Nye” and who:“Mister Wizard”

that would be just fine with me.

It should be executing searches as you type: is that not working for you?

I need to play with it more to give you some more detailed descriptions of what I’m seeing, but briefly, I would say that it returns SOMETHING as I type, but I can’t make sense of what it is. It’s usually a handful of photos peppered over the page.

I believe I’ve fixed this in v1.0.0-alpha.7, which I should be able to release in an hour or two.

I’ve made the query parser grumpy about mismatched doublequotes, trailing ANDs, and now replace prior queries if they are a substring of the current query:

const addQuery = debounce((q: Query) => {
  // minimal normalization:
  if (q == null || blank(q.q) || priorQueries.some(ea => ea.q === q.q)) return
  // if the top query is a subset of this query, replace it.
  q.q = toS(q.q).trim()
  if (q.q.startsWith(toS(priorQueries[0]?.q))) {
    priorQueries[0] = q
  } else {
    priorQueries.unshift(q)
  }
  if (priorQueries.length > 7) priorQueries.length = 7
  window.localStorage?.setItem("priorQueries", stringify(priorQueries))
}, 1000)

derp… let’s try tomorrow morning … I got some good stuff done tonight, though:

  • In the current alpha, I experimented with running a search as you typed your query. In practice, this was distracting and confusing. Searches in alpha.7 now only happen when you hit return or click the magnifying glass (which is the form submit button), and on mobile, when you click “search” on the keyboard (because the input type=“search”).

  • Search result infinite scroll is now a thing

  • You can now clear prior searches (there’s an X to the right of the heading)

  • Search examples are looking nicer, and I added a couple more:

1 Like

Debouncing still doesn’t work too nice if you type too slowly Bill Gates, the Prior Searches list will look like

B
Bi
Bil
Bill
Bill G
Bill Ga
Bill Gat
Bill Gate
Bill Gates

I think you should store the query in the Prior Searches list only if user made some explicit action such as pressing Enter or clicking on the asset

@mnaoumov we’re in total agreement: see my post right above yours.

I’ll build the new alpha this afternoon. It may even warrant being a beta!

2 Likes