here is some feedback from using the search API from a user point of view:
* it would be nice to get a default db server for the current db if the db server module is active
Calls the standard entity_prepare_view() function for all items.
Way to technically. Why should I enable it and why not? Honestly, I don't know either.
Select processors which will pre- and post-process data at index and search time, and their order.
To which data do those processors apply!? To the fulltext only? I'm rather confused by that. What are the pros/cons of the single processors? When should I use them? Perhaps a link to some more help would be nice here.
Whether detailled field types are supported depends on the type of server this index resides on. Check the server's service class' documentation for details.
You mean I should look up the code to know is supported? Not very user friendly :P
Comments
Comment #1
fagoalso a sensible default of fields to index by default might make sense as it requires much thought of what is need afterwards. At least fulltext field should be checked by default, as the user has already expressed his desire to have it :)
Comment #2
fagoalso "data alter callback" is very technically. Perhaps we could come up with a more user friendly name for the UI.
Comment #3
drunken monkeyHonestly, I don't know either. ^^"" There was just this comment in the discussion that I should somehow not use the rare data but build the view, and as I told you, there was no real way. Best I could do was call
entity_prepare_view(), without really knowing what that would do, so I provided an option for it.Now that the Entity API supports viewing, this will probably be useless anyways, once I implement the viewing stuff. So I just deleted the callback.
The processors can choose themselves what fields to process, though probably most will only process fulltext fields.
I don't think a link is needed, I should probably just write longer descriptions for the individual processors (and add a sentence stating the previous sentence to the overall description).
Do these descriptions sound better?
No, I mean the README.txt, and it's got a capitalized "read me!" in it for a reason. ;)
Also, when viewing a search server, it's description is displayed. I could (and probably should) add information there on what the server supports or doesn't support.
You can't really do a generic "sensible default". And when you can't do that, I don't think that checking fields added by data alter callbacks by default will improve UX significantly.
That's what I said from the beginning, but up till now, no one (including me, of course) came up with a better one. I'm more than open to suggestions.
Comment #4
fagoGreat! Yes, it might be useful to have fully themed entity views indexed in a certain view mode as full text!
@processors:
Yes, way better!
@Readme:
I see. "server's service class' documentation" suggests me it is class - thus code - documentation. Perhaps say server's service module documentation instead.
@data alter callback:
What about "data alterations". Users should not know about callbacks ;) However there are also processors, so there might be the question what the distinction is. I think alterion is more for addition, so what about "data additions".
>You can't really do a generic "sensible default". And when you can't do that, I don't think that checking fields added by data alter callbacks by default will improve UX significantly.
Why do I have to check the full-text field manually when I already said I want it? I'd assume it's there once I checked it once.
@sensible default: Yep, probably we'd have to hardcode them e.g. by specifying them to be on by default with an entity metadata property. But well, perhaps we just provide a useful default index for nodes so people have an easy start?
Comment #5
drunken monkeyI just enhanced the service class descriptions provided in the hook and linked to the server page (if one is available). I think this is the best solution, even if the information is now slightly duplicated.
OK, I found an easy and clean way to do it, so: done.
Seems like a good idea. Done.
@ "data alterations": Hm, I'll have to think about that one. It's right, users shouldn't see the word "callback", but now it's everywhere in the whole module, so it's quite some work to correct it. Which doesn't mean that I won't do it, but then it should be final, so I'll have to make sure we got with the right one this time.
Comment #6
fagoGreat.
@data alterations:
You can easily change the name for users only, so it doesn't involve callback but use the stay with the old name in code. If you call it just "data alterations" for every developer it should be still clear that this is about the data alter callbacks.
Comment #7
drunken monkeyYes, of course – I wouldn't have considered changing the hook anyways. And as I took a quick look, the name "Data-alter callback" was only used on a single page (index/%/workflow) and in the README.txt, so I just changed it. If someone comes up with a better name, great, otherwise this is already definitely an improvement. (Even though it's a little awkward having two Austrians discuss what sounds best in English. ;))
Comment #8
fago>Even though it's a little awkward having two Austrians discuss what sounds best in English.
Agreed :)