当前位置:网站首页>Algolia's search needs are almost closed
Algolia's search needs are almost closed
2022-07-01 23:37:00 【A hundred chocolates】
Hello everyone , I am a Chocolate.
6 month , Don't say , It's really self closing to do demand , Today, let's focus on this contact algolia Search this thing .

It's annoying to mention search now ,6 This search function is interspersed with months , Why is it annoying , Let's give an example first :
Front end projects are relatively old , Native html css js To do it The demand raised is a little unreasonable The design draft provided by the design is very difficult to implement
Front end configuration problem
Let's talk one by one : The first is the front-end project configuration , Even though algolia Support , Provides js Version Library , be called Autocomplete, The search effect of official documents is also done with this , And it also provides related construction introduction . But it's really troublesome for me to realize it , stay js In the document html, Do you dare to think ?
Secondly, there will be a lot of duplicate code , Of course, repetition here does not mean the same code , Of course, the same one will be pulled out , Here is just the same form , But you just have to write .
Maybe you need to ask ,js How to write html ah ?
Simple ... Just splice the template string , Fortunately algolia Provides a html Method , take html Files in html Medium will do .

The bad thing about this is that it's not good to split modules , The code is written directly in one piece , It's still written in js Inside , Suddenly thought of writing jsx It's really cool . In the actual code time , The code file is relatively long , You also need to scroll through the context , This is also a development method I don't like very much .
Usually, it can be split into smaller parts and disassembled as much as possible , In this way, you can see the main code on one screen , It is also convenient for split screen development .
Summarize this point , Do something new for old code , It's really hard to write , Not very efficient , At this time, there may be a little friend asking questions , The project is relatively old , You can replace it with a new one , Want to use react Change directly . This is the second point we want to talk about :
The demand is too outrageous
Second point , The demand raised is a little unreasonable . First answer the last question above , Although it is a static page , It looks easy on the surface , But I don't know what special content there will be in the project , For example, it was originally made from raw materials , If I change react, Do you have to look at the relevant library again , Some pages may also be buried , So there are most of the needs in the past , The potential risk is still quite large . in addition , At the beginning, the product said that I didn't have much time to do it , Because I took over , It was done by another front-end for a few weeks , When you find that you can't do it, just give it to me .
In terms of time , I don't have much development time left , But the end result is , I've been doing it intermittently for a month , With this time, I can completely replace the new framework , Sobbing ...
Let's talk about this demand , Because I don't know how to conduct the review before , Just say these functions can be done , Later, when I read the document , I found that some functions are really difficult to do , It also requires a certain labor cost , In fact, searching should not be difficult for the front end , Render the search page , Here is mainly about data acquisition ,algolia Built in function to help you match search results , You only need to provide relevant data , This involves crawling data , At present, our back-end students won't Python...
Can't , In college, I played by myself , Harden your head and learn it by yourself , It took a few days to finally write a complete crawl code , The data is OK for this demand .
that , The front and back ends should look ok , Why can we do it for a month ? That depends on the third point :
Design interaction , difficult !
The third point , The design draft provided by the design is very difficult to implement . At the beginning , I always thought designers saw algolia Official effect , After making a version later, I found no , But according to the effect of a website , So I mentioned that I don't know how to evaluate before , In terms of design, they think these can be done , But then I looked through the documents and evaluated , It's really hard to do when you find it .
It's completely two styles , There are also communication problems in product and design , Some typesetting displays may not be the desired effect of the product at the beginning . So when I finally do it, the page implementation has a splitting effect .
After several communications , Here's the thing , At that time, several people came behind my station , The scene , The whole area is talking about this search . During this period, I changed the design draft several times , In the end, the operation and design compromise each other , according to algolia Official interaction effect to change , Finally, this matter is over .
Let me tidy up
This process , It's really tiring , It can also be regarded as giving yourself more things to consider on the development road , Share with you here :
1. More important requirements , Especially those who need to provide solutions , Be sure to know more about this background , The review cycle can be prolonged , I don't think the data acquisition on this page is a pain point for me , This can take time to solve , The pain point is that there is a big gap between the results and expectations , Most of the problems in this process are communication problems , In fact, the cost of communication is what this demand should reflect .
2. Try not to take over the demand for semi-finished products , Don't consider whether to throw the pot first , Turn to yourself , Then take the initiative to ask more , Evaluate some risk situations , If you encounter difficulties , I still have to offer it , If you can't do it, you can't do it , After all, what we realize is ourselves , Other people will not consider the old and new problems of your framework or code .
3. Maybe this is a big challenge , But after experiencing it, you will find that it is still very helpful for your growth .
Lost or gained
Let's move on to the last point above , I still feel that I have learned a lot this month , For example, I studied algolia This website , I have read most of the documents , Probably know what pits there are , For example, some functions are built for their paid functions , This is also necessary , This website is certainly not for your whoring , There will still be some value-added services , It is this kind of value-added service , Maybe it's what we want .
For example, this crawler function , At the beginning, I specially went to consult customer service ( English communication through translation ), The official provides the crawler function , It does look good , But I converted the dollar , It costs about a year 12w, This huge amount of money is completely unnecessary , At that time, I was also scared by the price , Talked to the Group , It's a bit of a hole , I feel I can make do with writing a reptile , Maybe the content we crawl doesn't need to be so advanced .
As mentioned before , For data crawling , I learned something by myself Python, For simple data acquisition , I can write some by myself , in addition , The code must not be placed locally , I need a scheduled task , Like every Monday morning 7 Click to automatically execute the crawl code to update the latest search data , Here I learned another skill CI, Prepare the script , hand CI Help me finish it automatically , This novel feeling is really good , I found it was really fragrant , It can be used in many scenarios , In the future, some repetitive work is still handed over to the machine for convenience .
At the end of
that , I've talked so much about search , There are gains and losses , Lost a lot of patience , It took a lot , But after all, I still got a lot , This experience is worth adding ~
This article starts with personal official account. 「 Little lion 」, If you like it, you can pay attention , as for give the thumbs-up Everyone knows .

Set a small goal this time ,20 Like we'll meet soon next time , I still have a lot to share ~
边栏推荐
- Overview of edge calculation
- Reproduction process and problems of analog transformer (ICLR 2022 Spotlight)
- Redis RDB快照
- 距离度量 —— 汉明距离(Hamming Distance)
- Matplotlib常用设置
- Distance measurement - Hamming distance
- Concurrentskiplistmap -- principle of table skipping
- MT manager test skiing Adventure
- Zero foundation tutorial of Internet of things development
- 2021 robocom world robot developer competition - semi finals of higher vocational group
猜你喜欢

algolia 搜索需求,做的快自闭了...

纪念成为首个DAYUs200三方demo贡献者

Door level modeling - after class exercises

The best smart home open source system in 2022: introduction to Alexa, home assistant and homekit ecosystem

Overview of edge calculation

【.Net Core】程序相关各种全局文件

Is there a piece of code that makes you convinced by human wisdom

Chapter 6 data flow modeling

Matplotlib常用設置

mt管理器测试滑雪大冒险
随机推荐
[untitled]
mysql:insert ignore、insert和replace区别
使用 pair 做 unordered_map 的键值
Notblank and notempty
How excel opens CSV files with more than one million lines
边缘计算概述
2022 safety officer-c certificate examination question simulation examination question bank and simulation examination
Oracle中已定义者身份执行函数AUTHID DEFINER与Postgresql行为的异同
共享电商的背后: 共创、共生、共享、共富,共赢的共富精神
物联网技术应用属于什么专业分类
PostgreSQL source code (57) why is the performance gap so large in hot update?
What is the difference between memory leak and memory overflow?
jpa手写sql,用自定义实体类接收
BlocProvider为什么感觉和Provider很相似?
ADO.NET之SqlDataAdpter对象
Matplotlib common charts
What category does the Internet of things application technology major belong to
Create Ca and issue certificate through go language
转行软件测试,知道这四点就够了!
字典、哈希表、数组的概念