-
Notifications
You must be signed in to change notification settings - Fork 4
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
Some suggested improvements for this module #9
base: master
Are you sure you want to change the base?
Conversation
…nt::getPropertyDefinitions().
…pping_alter() with fields from other datasources.
…at are indexed.
Wow, Code Climate is pretty harsh … Please tell me which of those you'd actually consider problems and want me to fix! |
Wow, this is incredible. Thanks so much for your hard work. You fixed several things that have been bugging me for a while, but that I hadn't even noted anywhere like ID field select list. I read through the changes and they look good. I can't wait to test them. I so wish I could work on this today, but I can't. I have unrelated stuff for work that I need to get done. I will come back to it this evening. |
Yeah, CodeClimate really likes to call you out on things. I had to lock it down a bit just to stop it from doing things like complaining about non-Camel case variable names in function definitions. I wasn't going to make them different from however they're written in the API just to make CC happy. I'll look at the issues it identified and see if there's anything to be done about them. I know a couple will go away once the default query setting is implemented. CC doesn't like that the setting's code is commented-out, neither mine or the change you added. On a related note, we do need the setting. It was necessary to fix a problem with Sarnia, which I should have remembered since I worked on that issue. |
Glad you like it. ;) It's no problem if you don't have the time to review right away, I totally understand. |
If you feel like adding the setting, sure. Otherwise I can do it. |
I've been checking out all the changes this evening. Most of it looks really good. I have two or three questions and I want to do more testing on the new field config settings. When I tried to add and display a language field Views got really mad at me and printed a bunch of illegal offset warnings. I'd like to figure out why. It's almost 2AM though and I'm done for the night. |
You're right, I messed up a bit with the language field (and all the other |
Added the "Default query" option. |
I didn't know what I was doing. I just did what I thought made sense, especially when it came to the TypedData parts of the module. If you see a better, simpler way to do anything then that's great.
I suppose I should have finished investigating whether or not we actually need the setting before saying that we definitely need it. In Sarnia, the setting was necessary because other, non-eDisMax query parsers default to not selecting any records when no query has been run. So you end up with a blank search page, which some people don't want. If Solarium's default query takes care of this, then we wouldn't need the setting. It's been a few weeks since I added the requestHandler setting, but I think when I tested that, handlers with other parsers still resulted in the blank page. I may be mis-remembering. |
I found an issue with the language configuration setting. That field must also be added to the index's field list. I configured the language field, added that language field to the index, added the Item Language field to a view, and verified that it was working. After that, I wanted to see what would happen if the field were removed from the index. I suspected that it might cause a problem and it did. When I refreshed the view, no results were returned and a warning message was printed: "The Solr field ss_language has not been configured in the index." I have an idea for how this might be fixed, but I'm too tired to test it at the moment. I'm looking at the query that's sent to Solr and I see search_api_language. If this is like search_api_id, then maybe we can just re-map search_api_language to our field just like I did for the ID in search_api_solr_datasource_search_api_solr_field_mapping_alter(). I don't know if that will work or not, but that's what I'll try first. My guess is that the label and URL fields would have the same problem, but since I don't know how to use those configured fields (see above) I don't know how to test them. |
As the PR title says, this is just a suggestion. If there are no prefixes or suffixes, this generally makes the labels look nicer, and doesn't really add confusion, I think. And my thinking was that if you use an external source for the Solr index, you'd be more likely to have a schema with fixed fields, not dynamic ones like with the Search API Solr module. I could easily be mistaken there, though, it's just a guess. In any case, keeping the raw field names there is probably the safer bet. (It also avoids ambiguity in case two field names map to the same "pretty label".) Or, as an alternative, we could include the raw names in the labels, like so: "Ds changed (ds_changed)".
As you say, they're not hurting anything, and they are supported by the framework, so I don't see a reason why we shouldn't have them.
Your suggested fix for the language field sounds good, thanks, didn't think of that. Unfortunately, label and URL don't have those mappings available – see |
Have to go back on that: it does sound good, but unfortunately it doesn't seem like it'll work that easily. The problem is that the Solr backend still won't add the field to the item in |
The Solr patch got committed, and I think I've fixed the problem with retrieving the language (etc.). |
I've pulled @drunken-monkey patch to my local and updated all my cores. Everything still works great and haven't noticed any regressions :) |
Cool. Thank you for letting me know. I made it through reviewing most of the changes. I just haven't had time lately to finish. I'm sorry guys. I'll try to wrap it up in the next couple of days. |
Where will the data come from? Can @Dcameron please help? |
@ravi-sidd You should not use this module. Its functionality was merged into Search API Solr 8.x-2.x. But to answer your question, it allows searching of any Solr data. It doesn't matter where the data comes from. It was made for people who have non-Drupal Solr data that they need to search. |
Hey @Dcameron Thanks for writing. Really appreciate your quick response. I have a scenario like this - Could you please suggest on how to achieve this?
Now there is a need where I need to web scrapping and fetch data from other external non Drupal sites-
Any suggestions or thoughts on how to achieve this? |
First off: Amazing job, thanks a lot for this module! Looks really good!
I did find some areas to improve, though, most of which you seem to have been aware of anyways. Would be great if you'd consider some or all of these to this project. (It also includes a fix for #7.)