sharepoint search doesn't work properly after change environment - xslt

I have a trouble in sharepoint search.
I have dev environment and customize the Core search web part results.
The results view changed with xlst. In xslt i use HitHighlighting template for highlighting search results and jquery for replacing # symbols.
On dev environment search site work great, but when I moved my settings to test environment some functionality doesn't work.
Search works with title in query, with query includes title and some properties, but doesn't work with query includes title with some other properties.
I tried to output search raw result and all of searched properties are in raw result. But when I use query like title and one of "problem" property the raw result return empty.
Why sharepoint search returns no result on query with "problem" property and return this property in raw result with title search query.
Where can be the difference in my environments?

I resolve my problem.
At test environment I delete Search service with database from services in CA.
Then I create a new one and configured it. Search start works properly.

Related

Why is flask turning %20 into %2520?

I created a personal CMS project where each page is stored in the database with the following columns: title, url_safe_title, and content.
To create the url_safe_title, I used urllib.parse.quote() on the original title. So if the page title is "My Page", the url_safe_title will be stored as "My%20Page".
On templates, I'd build URLs using url_for('core.page', page_name = page.url_safe_title), where page_name is the expected variable in the view function.
#core.route('/<string:page_name>')
def page(page_name):
# find the relevant entry in db
return render_template('template.html', page = page)
However, the resulting URL becomes "www.example.com/My%2520Page" instead of the expected "www.example.com/My%20Page". I checked the url_safe_title value stored in the database, and it's the correct value ("My%20Page").
Interestingly, "My%2520Page" worked when trying to query for a page that has url_safe_title as "My%20Page" when I was hosting this app locally. However, it all fell apart when I hosted it online. Unfortunately, the host is a limited cPanel host without any access to the terminal, so I'm unable to find out what the OS is. I only know that the python version is 3.7.8, and my local python version is 3.7.4.
I've also tried using the |safe jinja filter when building the URL url_for('core.page', page_name = page.url_safe_title|safe), but that didn't help either. I passed the page.url_safe_title as a variable on its on to show on the page, and "My%20Page" was displayed.
%2520 means it is getting encoded twice. You should not encode it before storing in the database. It is just a string.

Index documents to Solr using sunburnt

I want to index few csv files in solr and build search engine using sunburnt for solr,
from sunburnt import SolrInterface
si = sunburnt.SolrInterface("http://localhost:8985/solr/practice")
I get an error:
Key error: id
I am using python 2.7.11, Solr - 6.1, sunburnt 0.6
I found same post here in stackoverflow but it just had one answer and its link is not working now.
I am stuck. please guide me what should I do.
I have to build search engine which can search over multiple fields and over multiple files. I found that sunburnt is best for my case. Any suggestions?
Are your providing an Id for your document or not ? In Solr schema.xml generally id is defined as a Unique Key and is a required parameter. Generally CSV files may have or not have an id field inside them . If not present , using DataImportHandler you can send a file with id . But for a quick fix solution , go to your schema.xml , look for a field declared as id .Remove required=true parameter from this field . Also look for a uniqueKey tag defined in your schema.xml generally defined at the top of a schema.xml file . Remove it completely and try again by restarting the server. If this error resolves, you can further spend your time exploring how to send id as a parameter to your documents . An id for a document is required to uniquely identify it , otherwise same document could be indexed by Solr multiple times, there by creating duplicate documents in the index, which is not desirable at all . Hope this helps :)

How to exclude webstorm files from search results

I have set up a custom scope in webstorm, and am trying to use it to limit search results by excluding third party libraries and such when doing 'Find in Path'. However, even though my custom scope is based on my project, I still get results in my search from outside my project. In particular, I get results from webstorm libraries and plugins:
I am using Webstorm 10.0.4
How do I filter those results out of my search results?
Known issue, IDEA-139723, please follow this ticket for updates.
To get rid of the issue, I'd suggest using 'include' filters in scope instead of 'exclude' filters - i.e. instead of excluding certain folders, just include everything you'd like being included

SharePoint-Search 2013 Query Transform keeps appending SPSPeople exclusion

I'm trying to get FQL working in an out-of-the-box Enterprise Search Site Collection in on-premise SharePoint 2013, with no success.
Intended query behavior is to:
- Accept and query search terms
- Limit results to the current subdomain (https://teams.domain.com/...)
- Exclude People from results
Our functioning KQL Query Transform is
{?{searchTerms} {?path:{QueryString.p}} -ContentClass=urn:content-class:SPSPeople}
As instructed in MSDN I copied current Result Source (in Site Collection Administration) and modified the Query Transform to:
andnot((and({?{searchTerms}},{?path:{QueryString.p}})),(filter(contentclass:"urn:content-class:SPSPeople*")))
I tried other variations as well but none work.
Even more puzzling to me when I go from "Basics" tab to "Test" tab and click "Show more", the Query text box is ALWAYS appended with
-ContentClass=urn:content-class:SPSPeople
Since it's not FQL formatted I figure that's why my template won't work. I've been at this all day now... Any suggestions what to do next? How do I get rid of that KQL suffix?
Figured it out... I trusted the FQL Query Tranformation was correct and bypassed the "Launch Query Builder" button altogether, inputting the FQL into Query Transform text box.

Sitecore language search with Lucene.NET

I am using Alex Shyba's Advanced Database Crawler to index data from Sitecore and Lucene.NET queries to make search queries. I have it working solidly for the most part but having issues with the _language field when I try to do a term match for example en-US, zh-CN and de-DE.
It returns all results for the 'en' culture. But for example in the zh-CN culture it's returning about 99% of the results and leaving out 2-3 articles from each set. The en and zh-CN are different versions of the same item. I can see both information about the item in both cultures in the index via Luke.
I am using TermQuery on the language field to return data. I tried using PhraseQuery and WildCardQuery but everytime I got the same results.
I tried escaping the hyphen since Standard Analyzer doesn't like hypens with a back slash but that didn't work either.
At this point I am out of ideas. How can I have my queries return all the matching documents?
Thanks
The ADC has its own query objects to define search parameters. Simply use the Language property on the SearchParam object to search by a language.