New playground snippet search Release-Candidate

Hello dear people,

For a long time we had a text-based search for the snippet server that was highly limited. There was no way to search for more than one keyword, filter results, or use advanced search mechanisms. On top of that, it was very slow!

For the last few weeks I have worked on migrating the old snippet server to a brand new architecture. On top of simplifying our infrastructure, it also allowed me to generate an advanced search index based on all of our code snippets. Whenever you save a playground, it is stored in our search index. The stored title, description and tags provide the search engine some more information.

So, without further ado - I would like to announce that you all have access to this wonderful search index at Playground search page | Babylon.js Documentation (babylonjs.com). Using this page you can use natural language to search for playground snippets, check their code and load them. You can use advanced search methods:

Use Boolean operators to force a query to exist or not - “+FreeCamera -PointLight” will give you playgrounds with free camera but without a point light. Using “|” you can ask for playgrounds with “FreeCamera | ArcRotateCamera” , for example. And of course, you can combine them all.

Using asterisk you can search for any phrase that starts with a certain phrase. For example, “Partic*” will match particle and particle system. And “I use Particles in my game” :slight_smile:

You can use quotes to match a term exactly.

Oh, and you can search for static methods now! You can search for “Vector3.Zero” to find all playgrounds using this method. Probably quite a lot!

And that’s about it, I guess. I will be happy to know what you think of that. I still call it RC and not stable, as I am still tweaking with a few parameters, AND the proxy server capacity is not as high as I want it to be (but probably enough for our needs for now).

24 Likes

Wow wow wow, that’s some news.

I just gave it a try, searching for my playgrounds (knowing about some keywords which are mine). It works like a charm, and its very fast ! It will be for sure very useful !

Well played, and thanks for the work :clap: :clap: :clap:


PS : It seems that the description of a playground is not indexed, right ?


++ :slight_smile:
Tricotou

2 Likes

You can either search in the code or in the tags/description with the dropbown on the right in the search page

Yeah, forgot to mention that. The old search allowed us to only search one field. The new one is a much better index, but I’m still not sure about the weight scoring between deception, name, tags, and code. So for now you are still searching for a specific field, but eventually it will be using all.

Yep :+1:
I asked because I was wondering if the fact that the search param is called “name” (When you select “Title/Desc”) would mean that description was not yet indexed, or something :slight_smile:

Also, for example when I search “Multi Camera PostProcessed, supporting MSAA, ImageProcessing, Glow” it indeed finds at top result the playground which has this exact title. But when I searched for “Tricotou” which is in the description of most of my PGs, I had no result. But maybe I was looking for the exact exception since this PGs might have been stored/save at the same time you was doing the migration :grin:

Anyway no problem, what’s there is already working great ! :slight_smile:

1 Like