当前位置:网站首页>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 ~
边栏推荐
- 2022 crane driver (limited to bridge crane) examination questions and simulation examination
- Switch to software testing, knowing these four points is enough!
- MT manager test skiing Adventure
- 【C#】依赖注入及Autofac
- Openwrt enable kV roaming
- Daily three questions 6.30
- const // It is a const object...class nullptr_t
- Who do you want to know when opening a stock account? Is it safe to open an account online?
- kubernetes资源对象介绍及常用命令(三)
- Redis master-slave synchronization
猜你喜欢
Notes to problems - file /usr/share/mysql/charsets/readme from install of mysql-server-5.1.73-1 glibc23.x86_ 64 c
Experience of practical learning of Silicon Valley products
距离度量 —— 汉明距离(Hamming Distance)
为什么PHP叫超文本预处理器
Deep learning | three concepts: epoch, batch, iteration
Redis 主从同步
物联网技术应用属于什么专业分类
Redis RDB快照
深度学习 | 三个概念:Epoch, Batch, Iteration
华为HMS Core携手超图为三维GIS注入新动能
随机推荐
URL introduction
ShanDong Multi-University Training #3
What is the difference between memory leak and memory overflow?
How to display real-time 2D map after rviz is opened
Similarities and differences between the defined identity execution function authid determiner and PostgreSQL in Oracle
神经网络物联网的发展趋势和未来方向
Redis 主从同步
【必会】BM41 输出二叉树的右视图【中等+】
2022 crane driver (limited to bridge crane) examination questions and simulation examination
VIM color the catalogue
What category does the Internet of things application technology major belong to
哈工大《信息内容安全》课程知识要点和难点
Door level modeling - after class exercises
TS初次使用、ts类型
SWT / anr problem - SWT causes low memory killer (LMK)
Applet form verification encapsulation
深度学习 | 三个概念:Epoch, Batch, Iteration
kubernetes资源对象介绍及常用命令(三)
华为HMS Core携手超图为三维GIS注入新动能
【C#】依赖注入及Autofac