-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking/abstract out examine attempt 2 #14495
Breaking/abstract out examine attempt 2 #14495
Conversation
Hi there @bielu, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
… removing examine
Hey @bielu, I know that you'll need some more input from HQ to get this over the line, just want to flag a couple of things in the mean time. Draft PRs don't necessarily alert anyone, so once you're ready for some input be sure to tag someone to take a look (I don't know if simply changing it from a draft will alert anyone either, and as you've already started the conversation on #13851 it's best to tag Bjarke and/or Kenn when you're ready). Core Collaborators don't have the power to merge to v13/dev so you'll either need to get someone from HQ to do that or retarget it to /contrib. Thanks, and good luck! |
@JasonElkin It is draft on purpose, as agreed with Umbraco HQ :) as it is one of PRs which we want avoid merging by incident. |
Totally, @bielu. TBH my reply was more to stop the Core Collabs automated alert from complaining to to us that nobody had gotten back to you yet (no reply for 201 business hours, it tells me 😱). But also, on the grounds that this isn't the usual contribution path, and we're doing things in the open, it's helpful to make the process clear for the benefit of any others that come across this. |
@kjac when you have time, I need some back and forward about unit tests.
|
Hi @bielu 👋
Yes, definitively 💯
I'm not entirely sure what you mean here. If the Delivery API query providers are rewritten to use the search abstractions you're creating here, wouldn't the above mentioned provider based test be sufficient? Don't get me wrong, I'm all for more tests 😄 just making sure you don't scope creep yourself here. |
@kjac I meant that we now have special abstraction for filters, which I would love to cover with examples from current requests to headless api, to ensure swap from examine to search providers doesnt change outcome :) |
@kjac I started implementing unit test, so to ensure the abstraction and idea works as we wanted, I introduced Lifti provider, which is basically in memory search provider :) |
@kjac managed to correct indexing of Node Alias! btw when you requested from api can you share test db + request which you doing as I cannot reproduce issue with api not returning content 😢 |
…-out-examine-attempt-2
@bielu I see the alias now 😄 Still don't get anything from the Delivery API though. DB attached here - admin login is test@test / Test123456 I'm still using the "default" Lucene directory factory, but hopefully that is not the issue: "Umbraco": {
"CMS": {
"Examine": {
"LuceneDirectoryFactory": "Default"
},
... I can query single items just fine ( Querying multiple items ( |
@kjac will have a look over next few days, but going for holidays today so will be less responsive |
Don't fret - enjoy holidays 😄 |
|
@kjac just pulled and play around with your db, |
Hi @bielu - welcome back. I'm pressed for time this week... the community teams are visiting, so a fair bit of my time is reserved for that. I'll try to find time to pull and test again during the week, but it will likely be next week. |
@kjac Lets find time next week to sitdown and see why it doesnt work if it still doesnt work for you? |
Hi @bielu, Coincidentally I did debug the PR this morning. The concrete problem has to do with the I'm seeing a few other issues with the query when querying the Delivery API index. The Lucene query looks like this: However, the corresponding Lucene query in v12 and v13 looks like this:
On top of that, I can't see any difference in the generated Lucene queries when appending filters from my Delivery API query - i.e. appending I haven't tested appending sorting to the Delivery API queries yet, so I can't tell if the same issue is present for sorting. On a side note, the solution cannot build because
Now, we've been discussing things internally and there are a few more things to consider. TestingWhen it comes to Examine we're basically in a bad place test coverage wise. You also addressed this earlier. We've currently started looking into building a test suite for Examine, which will help ensure that we do not break things unintentionally while abstracting the search functionality. These tests will eventually cover both search and indexing for "regular" Examine indexes (like against the internal and external index) and Delivery API index. Tracking changes to the existing codeIn an effort to cut Examine from the core, you have copied out a bunch of code to new class libraries and obsoleted the old code. I like it, but I'm afraid it might be a bit premature. We are continuously making changes to that code. Particularly the bits that involve the Delivery API change frequently, but we might also be bugfixing things for "regular" Examine as well. I fear your approach will make it quite hard to track the ongoing changes and ensure that they're ported over to the new libraries. Maybe it would be better to do all these changes in-place to start with and split things out later? It would of course mean that Examine would still be a first-class citizen, but the upsides in form of change tracking may outweigh that. Thoughts? Backwards compatabilityIt seems I'm still able to use What I can't entirely grasp is... how will all these changes affect community search packages and generally the ability to perform advanced stuff like faceting and spatial search? |
|
I'm all for consistency. But we can't really change it at this point, because it'd require everyone to rebuild their indexes. We also can't assume what the field name is for custom indexes, or if it's even present (InternalIndex for example must be able to query unpublished content).
I believe In terms of change tracking and backwards compat I'm mostly expressing concerns here. At this point it's way more important to keep up with core changes than to worry about obsoletion strategies in my opinion. Also, I understand all the changes correctly, the obsoleted code won't actually be run (used in the DI) anyway? If that's correct we need to treat this whole thing as one big breaking change. That is, we still need to ensure that Ideally we'll have sufficient test coverage for indexing and searching to ensure that any functionally breakage is discovered by said tests 😄 |
We can duplicate property for now, that will have slight impact, it will just make marginally slower indexes.
Are we sure indexType is correct query? abstraction will be used between all types of indexes 🤔 maybe we should add dummy field and search for it?
i can remove obsoleting part and do just breaking changes, than we can track changes and git should try help use find what change and where 🤔 (we can add not breaking obsolete tags in separate prs than we dont have to worrying about introducing obsoletes in this pr?
Yes, you understood correctly, we still use ExamineManager in there so you can access it. We can do path with introducing obseleting in v12.x, but yeah it doesnt change classes would have to be in v13 still present, but yeah we have a lot code which doesnt run in umbraco and tagged and obsolete (logger injecting helpers etc) I think it would be beneficial to have call and include Bjarke to this and make full strategy on it, as right now we looking into it without any. |
I agree. We should talk this through soon. Bjarke is gone all week for the US summit. I'll get back to you next week, we'll see how the calendars might align 👍 |
Hi @kjac,
|
Hey @kjac any updates on your side? |
@kjac Hello mate, I have some time on my plate and wanted do some work related to this pr, but not sure if I should continue or should open new retargated to v14? |
Hi @bielu I apologize many times that we have been so slow to respond. It's just been really busy lately. In the team we have discussed how we can handle this PR and generally how we want to abstract the search in a good way. I'm afraid we'll have to go back into the thinking box a bit, so we make sure we get the right approach to all the use cases we see. I am very sorry for that, as I know you have already put in a lot of effort, which fortunately I believe we can get a lot out of. Sadly it will certainly mean that Umbraco 13 is not realistic to reach. The search abstraction is very central for us to get right. I think the next step is a RFC to be published with our thoughts, so that we can also involve a larger part of the community. Best Regards |
@bergmania that is fine, I am just little annoyed about lack of communication. |
Hey @bergmania, |
We haven't startet yet, but the aim in next year |
Hey @bergmania any updates on RFC? |
No.. It's currently not a priority. Goal is still some time this year. |
Retargeted pr, please read convs here:
#13851 (comment)
See also #13620