STIXProject / stixproject.github.io

Source for the STIX Documentation site
http://stixproject.github.io
BSD 3-Clause "New" or "Revised" License
42 stars 18 forks source link

Search does not work #273

Open jasenj1 opened 9 years ago

jasenj1 commented 9 years ago

There is an input field with "Search STIX Data Model..." on the front page. Once data is entered, there is no way to perform the search.

johnwunder commented 9 years ago

It's a javascript autocompleter. Because the site is static we can't actually perform a real search.

benjaminxscott commented 9 years ago

@jasenj1 This box feels like a convenience feature for devs - which I imagine is why @johnwunder created it in the first place. It's quite useful from that perspective, can personally attest to saving a bunch of time :D

Seems like the main user challenge is "What do I type so that it autocompletes to the right thing" - I've personally felt that confusion since the box gives no feedback until you start typing.

:shipit: In the immediate term, we should change the helptext to reflect the 'dev searching for a specific thing' use case

:grey_question: As a nice-to-have, perhaps having the field autopopulate with the basic types? I'd suggest having them show up on initial click (and before entering text)
like

IndicatorType 
ThreatActorType
...

Basically give users a sense of what kind of things they could be searching for, rather than being opaque as it is now. Sorta like a niche case of Google autocomplete

:grey_question: Another larger-effort option is to make it a real text-indexing searchbox, and refactor the current one under dev-specific documentation

johnwunder commented 9 years ago

tbh "STIX Finder" seems more confusing to me. "Search" might be problematic as a term but I'm not sure what else to use? That said if others are less confused by "STIX Finder" I'm fine with it, just seems pretty opaque to me.

I really like your last suggestion though, we should definitely do that. Should be a relatively straightforward javascript tweak.

The other thing we could do is if you hit enter and there are no results (which I think is what was confusing @jasenj1) show the dropdown with "Nothing found" and a hint of something to type.

jasenj1 commented 9 years ago

Since there is no button and no indication that an action has or hasn't been taken, I suggest that as soon as the input gains focus the drop-down be shown with some explanation of what's going on. "Enter the name of an item from the STIX data model." Then when there are enough characters for the autocomplete to kick in, the list of items will be populated.

As an ignorant user coming to the page for the first time, I have zero idea what that box is for. It claims to be a "search" box, so I enter some stuff. Nothing. Now I'm grumpy.

If upon gaining focus the box told me what to do, that would make me less grumpy.

gtback commented 9 years ago

It would also be super-amazing if it completed any part of the word, not just the start. Typing in "Header" could return STIXHeader, EmailHeader, etc.

Bonus points for element/attribute names in addition to type names. (I know this could be a ton of work, but I can dream, can't I? :partly_sunny: )

benjaminxscott commented 9 years ago

@johnwunder in reply to your comment - yeah I'm not married to 'stix finder' for helptext, tweaked a bit based on @gtback in the PR

Agree with the 'no results' case showing hints, how about just returning the basic types as a start? (i.e. not trying to do in-text parsing, unless that's super easy)

@jasenj1 - hmm, I'd lean against trying to explain very much in the box, in particular saying "stix data model" will likely be equally baffling. In contrast, showing a list of possible options means that they will be likely to take action without having to parse more text

ikiril01 commented 9 years ago

Maybe we could try some static search plugin like Tipue? See also.