#community-help

Issues with Titles in Typesense Metadata

TLDR Vladimir could not get meta tags to work for titles in Typesense. Jason provided troubleshooting help and Vladimir resolved the issue by creating a "display: none" div.

Powered by Struct AI

1

Oct 26, 2022 (14 months ago)
Vladimir
Photo of md5-7b8208683ba0167bf37013cf16be4f89
Vladimir
09:18 AM
Since Typesense is based on Algolia search, I followed a recommendation to put the needed information about component names in meta tags like this:

<meta name="version" class="version" content="1.5">
<meta name="title" class="title" content="Руководство программиста">

Unfortunately, it didn't have any effect. Can you give any advice on where Typesense is expecting to find group titles?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:49 PM
Vladimir The titles are picked up by docsearch-scraper based on your docsearch configuration file. Here’s how to change the dom elements that gets scraped: https://docsearch.algolia.com/docs/legacy/config-file/#using-custom-selectors-per-page
04:50
Oct 27, 2022 (14 months ago)
Vladimir
Photo of md5-7b8208683ba0167bf37013cf16be4f89
Vladimir
11:02 AM
Not sure if I'm doing something wrong.

I moved the information required for the titles to the meta tag: &lt;meta name="context" content="5.5.1 Консоль управления Docsvision"&gt;

Then I edited the configuration file to match the edits:

"selectors": {
   "lvl0": {
      "global": true,
      "selector": "meta[name=\"context\"]"
   },

But I still can't see the titles. Is there something I did wrong?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
01:01 PM
Did you also re-rerun the scraper after changing the config?
01:01
Jason
01:01 PM
If so, could you check the actual content of the fields in the Typesense collection, to see what DOM element is getting picked up for each selector?
Oct 28, 2022 (14 months ago)
Vladimir
Photo of md5-7b8208683ba0167bf37013cf16be4f89
Vladimir
07:09 AM
Yes, I re-run the scraper.

The actual content of the lvl0 selector field is null right now. Even though configuration file says "selector": "meta[name=\"context\"]" . The rest of the selectors have valid value.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:21 PM
Are these meta tags being injected by JavaScript?
Oct 31, 2022 (14 months ago)
Vladimir
Photo of md5-7b8208683ba0167bf37013cf16be4f89
Vladimir
06:13 AM
No, those are just plain HTML meta tags added statically.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
01:16 PM
I’m not sure what else could be wrong… I’d recommend running the scraper via a debugger and then stepping through the code to see why it’s not picking up those levels: https://github.com/typesense/typesense-docsearch-scraper
Nov 04, 2022 (14 months ago)
Vladimir
Photo of md5-7b8208683ba0167bf37013cf16be4f89
Vladimir
08:06 AM
I created a div with the required class and content, added it the property of display: none and it solved my issue. Thanks for reaching out to help.

1

Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:05 PM
Good to know!

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community

Similar Threads

Docsearch Scrapper Metadata Configuration and Filter Problem

Marcos faced issues with Docsearch scrapper not adding metadata attributes and filtering out documents without content. Jason helped fix the issue by updating the scraper and providing filtering instructions.

2

82
8mo

Solving Typesense Docsearch Scraper Issues

Sandeep was having issues with Typesense's docsearch scraper and getting fewer results than with Algolia's scraper. Jason helped by sharing the query they use and advised checking the running version of the scraper. The issue was resolved when Sandeep ran the non-base regular docker image.

28
24mo

Trouble with DocSearch Scraper and Pipenv Across Multiple OSs

James ran into errors when trying to build Typesense DocSearch Scraper from scratch, and believes it’s because of a bad Pipfile.lock. Jason attempted to replicate the error, and spent hours trying to isolate the issue but ultimately fixed the problem and copied his bash history for future reference. The conversation touches briefly on the subject of using a virtual machine for testing.

7

161
10mo

Troubleshooting Issues with DocSearch Hits and Scraper Configuration

Rubai encountered issues with search result priorities and ellipsis. Jason helped debug the issue and suggested using different versions of typesense-docsearch.js, updating initialization parameters, and running the scraper on a Linux-based environment. The issues related to hits structure and scraper configuration were resolved.

7

131
8mo

Issues with migrating search from Algolia to Typesense

Nacho encountered issues with migrating search from Algolia to Typesense, including a custom component that interfered with the search and an incorrect element being used as the title. Jason provided guidance on removing the component and adjusting search configuration.

6

116
10mo