edi3 / edi3.github.io

edi3.github.io
https://edi3.org
8 stars 12 forks source link

site search doesnt index the vocabulary #30

Open onthebreeze opened 3 years ago

onthebreeze commented 3 years ago

The search widget doesnt index the vocabulary?

LOCODES-for-AUSTRALIA-AU-Vocabulary-edi3-Standards-by-edi3 (1)

webilhan commented 3 years ago

@onthebreeze It is not included in search results because vocabulary pages not indexed by google, it is because we don't have any links which will go on vocabulary pages. I see 2 ways how we could organize the search for vocabulary:

  1. We can add vocabulary pages to the sitemap and they will be indexed by google and shown in all results.
  2. We can create a separate custom search for vocabulary by using lunrjs. In that case we could have more flexibility with search parameters.

We can also have both options. Let me know if you want to use custom search for vocabulary?

onthebreeze commented 3 years ago

Bit lunr.js is client side only right? So search will only show results from the currently loaded vocabulary

I think we need to be able to search the whole vocabulary.

webilhan commented 3 years ago

Yes, it is client side, but it will be able to search the whole vocabulary. So it will show search results on the separate page with links on related page. Something like this - https://prnt.sc/v1e3uc

onthebreeze commented 3 years ago

Ok sounds good - let's try it then

kshychko commented 3 years ago

@webilhan, we have to keep the anchors the same as the ids, we can't slugify them.

kshychko commented 3 years ago

@onthebreeze, the search is working on edi3.org now, but I limited it to search only among UNECE vocabulary. As we generate a single page for search results, my suggestion would be to support a separate search among different vocabury types, like

  1. Search in UNECE (working now)
  2. Search in LOCODEs
  3. Search in Code Lists
  4. Search in UNCL