Custom managed properties with hit highlighting Issue.
Hi All,
I have used this blog
and implemented the hit highlighting as of now everything works well but some of the search term I am getting below errors.
I have tried a lot to fix this but not success. Please suggest if I am missing something.
I am using the below code in item template.
var title = Srch.U.getHighlightedProperty(id, ctx.CurrentItem, "Title");
if ($isEmptyString(title)) {title = $htmlEncode(ctx.CurrentItem.Title)}
var Description = Srch.U.getHighlightedProperty(id, ctx.CurrentItem, "Description");
if ($isEmptyString(Description)) {Description = $htmlEncode(ctx.CurrentItem.Description)}
if(ctx.CurrentItem.sourcename != null){
if (ctx.CurrentItem.sourcename.indexOf('Purchasing')!=-1 && ctx.CurrentItem.sourcename.indexOf('Expenses')!=-1 ){
if(!$isEmptyString(Description)){
var Description1 = Description.match(/.{0,100}<strong[^>]*>(.*?)<\/strong>.{0,100}/g); // Reg ex to get the data
if(!$isEmptyString(Description1)){
ctx.CurrentItem.HitHighlightedSummary = Description1;
else{
ctx.CurrentItem.HitHighlightedSummary =Description;
Thansk
Basant Pandey
Hi Vikas,
The recommendation is not to modify the out of box display templates. Whenever new patch or service pack applied Microsoft can update those out of box display templates, then you modified version will be lost.
So, create a copy of the display template and make the changes as per your requirement. Once created new display template you can map it with the required result type and query rules. Please refer to the following article.
http://www.abelsolutions.com/totm/creating-customized-search-results-in-sharepoint-2013/
Please don't forget to mark it as answered, if your problem resolved or helpful.
Similar Messages
-
Custom metadata properties give no results after upgrade from 2010
Hi,
Although I see my custom managed properties in my Search Schema in Central Admin, I am unable to find results using them e.g. 'VendorName:Marcel'. I have tried changing the column value in a document and performed a full crawl, but still no results. General
searches such as 'Marcel' work fine and even something like 'author:marcel' (which is a built in managed property) works too. What am I missing? How can I determine the issue? Nothing stands out in the ULS logs.
Background:
I recently upgraded my managed metadata service and search service from 2010 to 2013.
I then upgraded the content db holding my root site collection, and had to re-create my search service proxy to get searches to work. I then upgraded the content db which holds my content hub site collection. This includes site columns, many of which
are also Managed Properties.
Crawls are running with 8 errors - none of which are for the document I changed. Warnings are mainly about 'png' files.
In 2010 I had scopes, which I no longer see in Central Admin. Although I have converted the content database without error, I have not converted the Site Collection to 2013 yet.
macrelI had to set each metadata property 'queryable' property and then run a full crawl after which the results were returned. I am surprised that this did not come over from the upgrade of the search service.
macrel -
Cannot see managed properties values in search result webpart- Sharepoint online
Hi,
Cannot see custom managed properties at site collection level in ResultScriptWebPart for SharePoint online. where as it is visible when i create managed properties @SSA (Search Service Application) level.
Below are the steps which I followed:
1) I have added few custom managed properties at Search Site collection level in SharePoint online.
2) Mapped those properties to user profile crawled properties
3) We are using those custom managed properties in ResultScriptWebPart(People Search Core Results) by using ItemTemplate
I cannot see those managed properties in search result.When I debug it in browser it comes as null.
But when I add these managed properties @SSA (Search Service Application) level I can see the value in search result webpart.
What is the reason value doesn't get populated at Site Collection level?
Thanks,
Prashant AHi Prashant,
Based on your description, the site collection managed property cannot work in SharePoint Online.
For troubleshooting this issue, I recommend to verify the things below:
Please make sure that the full crawl has been run after creating the managed property.
Please check if the managed property is set to be searchable.
Please search with this managed property to see if the results can be returned.
Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Victoria Xia
TechNet Community Support -
Managed properties in display templates
Hi
I'm trying to include some custom managed properties (GlossaryProductString) into my custom display template but the ct.CurrentItem.GlossaryProductString is always undefined.
What I did:
Create managed property and mark it as retrievable
Full crawl (I'm able to find results when using GlossaryProductString:"some content" as query)
Downloaded the item_default.html and renamed it
Added GlossaryProdcutString to the ManagedPropertyMapping properties ('GlossaryProductString':'GlossaryProductString')
Add the content to the template:
<p>Product: <span style="font-weight: 200">_#= ctx.CurrentItem.GlossaryProductString =#_</span></p>
all other stuff that is needed that the display template is used
The display template shows up for the results but the GlossaryProductString is always empty (undefined in JS object)
Any ideas?
Thanks for help.Hi
The REST call returns the GlossaryProductString. Here an excerpt of the result:
- <d:element m:type="SP.SimpleDataRow">
- <d:Cells>
- <d:element m:type="SP.KeyValue">
<d:Key>Rank</d:Key>
<d:Value>11.5733613967896</d:Value>
<d:ValueType>Edm.Double</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>DocId</d:Key>
<d:Value>725</d:Value>
<d:ValueType>Edm.Int64</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>Title</d:Key>
<d:Value>Argument</d:Value>
<d:ValueType>Edm.String</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>Path</d:Key>
<d:Value>https://sst-s13.ioztest.ch/glossary/Lists/Definitions/DispForm.aspx?ID=8</d:Value>
<d:ValueType>Edm.String</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>GlossaryProductString</d:Key>
<d:Value>Excel</d:Value>
<d:ValueType>Edm.String</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>OriginalPath</d:Key>
<d:Value>https://sst-s13.ioztest.ch/glossary/Lists/Definitions/DispForm.aspx?ID=8</d:Value>
<d:ValueType>Edm.String</d:ValueType> -
Generate PDF using Managed Bean with custom HTTP headers
Background
Generate a report in various formats (e.g., PDF, delimited, Excel, HTML, etc.) using JDeveloper 11g Release 2 (11.1.2.3.0) upon clicking an af:commandButton. See also the StackOverflow version of this question:
http://stackoverflow.com/q/13654625/59087
Problem
HTTP headers are being sent twice: once by the framework and once by a bean.
Source Code
The source code includes:
- Button Action
- Managed Bean
- Task Flow
Button Action
The button action:
<af:commandButton text="Report" id="submitReport" action="Execute" />
Managed Bean
The Managed Bean is fairly complex. The code to `responseComplete` is getting called, however it does not seem to be called sufficiently early to prevent the application framework from writing the HTTP headers.
HTTP Response Header Override
* Sets the HTTP headers required to indicate to the browser that the
* report is to be downloaded (rather than displayed in the current
* window).
protected void setDownloadHeaders() {
HttpServletResponse response = getServletResponse();
response.setHeader( "Content-Description", getContentDescription() );
response.setHeader( "Content-Disposition", "attachment, filename="
+ getFilename() );
response.setHeader( "Content-Type", getContentType() );
response.setHeader( "Content-Transfer-Encoding",
getContentTransferEncoding() );
Issue Response Complete
The bean indirectly tells the framework that the response is handled (by the bean):
getFacesContext().responseComplete();
Bean Run and Configure
public void run() {
try {
Report report = getReport();
configure(report.getParameters());
report.run();
} catch (Exception e) {
e.printStackTrace();
private void configure(Parameters p) {
p.put(ReportImpl.SYSTEM_REPORT_PROTOCOL, "http");
p.put(ReportImpl.SYSTEM_REPORT_HOST, "localhost");
p.put(ReportImpl.SYSTEM_REPORT_PORT, "7002");
p.put(ReportImpl.SYSTEM_REPORT_PATH, "/reports/rwservlet");
p.put(Parameters.PARAM_REPORT_FORMAT, "pdf");
p.put("report_cmdkey", getReportName());
p.put("report_ORACLE_1", getReportDestinationType());
p.put("report_ORACLE_2", getReportDestinationFormat());
Task Flow
The Task Flow calls Execute, which refers to the bean's `run()` method:
entry -> main -> Execute -> ReportBeanRun
Where:
<method-call id="ReportBeanRun">
<description>Executes a report</description>
<display-name>Execute Report</display-name>
<method>#{reportBean.run}</method>
<outcome>
<fixed-outcome>success</fixed-outcome>
</outcome>
</method-call>
The bean is assigned to the `request` scope, with a few managed properties:
<control-flow-rule id="__3">
<from-activity-id>main</from-activity-id>
<control-flow-case id="ExecuteReport">
<from-outcome>Execute</from-outcome>
<to-activity-id>ReportBeanRun</to-activity-id>
</control-flow-case>
</control-flow-rule>
<managed-bean id="ReportBean">
<description>Executes a report</description>
<display-name>ReportBean</display-name>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
The `<fixed-outcome>success</fixed-outcome>` strikes me as incorrect -- I don't want the method call to return to another task.
Restrictions
The report server receives requests from the web server exclusively. The report server URL cannot be used by browsers to download directly, for security reasons.
Error Messages
The error message that is generated:
Duplicate headers received from server
Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple distinct Content-Disposition headers received. This is disallowed to protect against HTTP response splitting attacks.Nevertheless, the report is being generated. Preventing the framework from writing the HTTP headers would resolve this issue.
Question
How can you set the HTTP headers in ADF while using a Task Flow to generate a PDF by calling a managed bean?
Ideas
Some additional ideas:
- Override the Page Lifecycle Phase Listener (`ADFPhaseListener` + `PageLifecycle`)
- Develop a custom Servlet on the web server
Related Links
- http://www.oracle.com/technetwork/middleware/bi-publisher/adf-bip-ucm-integration-179699.pdf
- http://www.slideshare.net/lucbors/reports-no-notes#btnNext
- http://www.techartifact.com/blogs/2012/03/calling-oracle-report-from-adf-applications.html?goback=%2Egde_4212375_member_102062735
- http://docs.oracle.com/cd/E29049_01/web.1112/e16182/adf_lifecycle.htm#CIABEJFB
Thank you!The problem was that the HTTP headers were in fact being written twice:
1. The report server was returning HTTP response headers.
2. The bean was including its own HTTP response headers (as shown in the question).
3. The bean was copying the entire contents of the report server response, including the headers, into the output stream.
Firefox ignored the duplicate header errors, but Google Chrome did not. -
my photos are not printing right with adobe manages color but works when i use printer manages color. never had any issues untill a week ago.
We use CS6, yes we calibrate using x-rite. I have always had adobe manage colors when printing. This problem just occurred, all my settings are the same as they have been for years. The only thing we did lately is do an update to CS6. We thought it might be our printer but when we use the printer manages color it works fine, The problem with adobe manages color is it is not blending the light highlights like on top of the cheeks with the colors around the cheeks and its putting a faint red between the two it just does not have a smooth transition. I printed a photo that I had printed 4 months ago with no issue, and this time it had the issue that I am dealing with now. Somehow the photo shop manages color is not getting the right info to my printer.
I set paper type
set quality
no color adjustment
set my profile
Teri -
Hi,
How to manage custom document properties (e.g., company name, project name, event date...) in Apple iWork Pages like it is possible in Microsoft Office Word ?
The idea is to simplify the management of multiple instances of same piece of information in a document by writing them once as a "properties" of the document that can be referencing in different places of the document. Changing the property value, will automatically change all its instances.
Thanks in advance for your helpThanks for your help Peter.
Search-Replace and Auto-Substitution are not requivalent for me since I'm looking for something more complex.
Suppose you have a document about an Event which occur on a specific date (e.g., 11-09-2003).
In your document, you may be interested in...
- sometimes display the date as '11-09-2003',
- sometimes display the date as 'Novembre, 2003',
- sometimes display the date as 'Sunday, November 9, 2003'.
With a document property, you would be able to define the EventDate as 11-09-2003, and then define different specific format (e.g., 'mm-dd-yyyy', 'mmmm, yyyy'...) for each reference to the EventDate document property.
Using Search-Replace of Auto-Substitution, it will be painful since you will have to define as one token per format of a document property (e.g., EventDateAsMMDDYYY, EventDateAsMMMMYYYY...).
More than that, suppose you have a Numbers table inserted in your Pages document.
You may be interested in using some document properties in formulas.
This can't be solved using Search-Replace.
But its ok, I will wait until this feature will be supported in Pages. -
Custom List definition site columns managed properties not appearing in search results
Hi i developed a site column, custom content type and a list definition. I set the value for this column and started crawling but i don't find these properties in search schema. If i add this column manually in a library and start crawling, these properties
are showed. What 's the difference?
kesari sureshHI,
I am able to finally crack the issue.
I forgot to add the Event Receiver for the new List Definition I was creating.
Added below lines in the Event receiver of List definition and found that the crawled properties and Managed properties (For Managed Metadata Columns) were creating successfully.
<Receiver>
<Name>TaxonomyItemSynchronousAddedEventReceiver</Name>
<Type>ItemAdding</Type>
<Assembly>Microsoft.SharePoint.Taxonomy,
Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
<Class>Microsoft.SharePoint.Taxonomy.TaxonomyItemEventReceiver</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
<Receiver>
<Name>TaxonomyItemUpdatingEventReceiver</Name>
<Type>ItemUpdating</Type>
<Assembly>Microsoft.SharePoint.Taxonomy,
Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
<Class>Microsoft.SharePoint.Taxonomy.TaxonomyItemEventReceiver</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
Thanks,
kesari suresh -
Adobe InDesign CC 2014 Custom Panel Built With Extension Builder - Problem: Can't tab from one entry field to the next; Hitting tab instead hides all palettes; Is there a fix? This didn't happen in Adobe Indesign CC
This is planned to be fixed in the next release.
-
Hit highlighting (PDF) is not working with Safari
We have been facing a weird problem with PDF documents displayed in Safari. This problem is reproducible in many of our machines. The problem is like this..
Adobe Reader has support for hit highlighting in PDF documents when it is being viewed in any browser. For example,
http://www.mysite.com/myfile.pdf#xml=http://www.somesite.com/words.txt
This URL should highlight the words specified in words.txt file. But, unfortunately many of our Safari browsers (on Windows machines) don't highlight any text in opened pdf file. The same URL works fine in rest of the browsers (IE, Firefox and Chrome). I could not figure out where the problem is!
Can anybody please help me on this?
Thanks in advance,Go step by step and test.
1. If adware is installed without your knowledge,
download free AdwareMedic by clicking “Download ” from here
http://www.adwaremedic.com/index.php
Install , open, and run it by clicking “Scan for Adware” button to remove adware.
Once scanning and removing the adware is done, quit the app by clicking AdMedic in the menubar
and selecting “Quit AdwareMedic”.
Safari
2. Safari > Preferences > Extensions
Turn those off one by one and relaunch Safari again to test -
Record about my phone (bought in Verizon store and connected to Verizon for 4 years) has been corrupted and now I can not make any changes to my data plan. Several sessions with the technical support and management have not resolved this issue. Each time technical people and top managers promised that this issue will be resolve tomorrow and they will cal me. Nothing happend!! I can not even cancel my service not just to upgrade it. Completely locked.
Any advice?
Thanks.
Alex.Cannot figure out what your talking about since it makes no sense.
If you are the account owner you can go to the My Verizon web portal http://www.verizonwireless.com
You must log in with your cell number and your my Verizon portal password. Not the account pin.
Once there you can change your plan and services. However repeated incorrect login attempts will lock you out of the site. It a fraud prevention measure.
1-800-922-0204 call support with your cell number and or account number and account pin and they can assist you.
If you don't have the information then there is nothing they can do.
If you can verify who you are they may be able to reset your account access. But only if you are the account owner.
Good Luck -
HT4623 We're sorry, we are unable to continue with your activation at this time. Please try again later, or contact customer care.----How to fix this issue while setting up the iphone for the new ios?
If you don't have a SIM card in the phone, you must put one in. It's required for activation.
If you do, then your phone was probably hacked to unlock it from the original carrier. Contact them and see if they will unlock it. If they will not do so, then you can't use that phone. -
this message appear when I launch any program within the CS3 suite
AMT subsystem failure. The licensing subsystem has failed catastrophically you must reinstall or call customer support. I call automated system which refers me to this site. I have reinstalled with the same issues not sure what else to do?Try this Help article
Error: "The licensing subsystem has failed catastrophically." when you start a Creative Suite 3.x application
Nancy O. -
Sorting with layout set for NewsBrowser and custom made properties
Hi
I have developed some custom made properties that is used for each document based on XML Form. But how can I obtain a custom sorting order based on my properties.
After created a document I define some properties for company, department and process. And using the layout set for NewsBrowser I will have my documents sorted due to my processes. Lets say that I have set the properties for the process for some documents, e.g. SA1010, SA1010-1, SA1010-1a, how to obtain this sorting order in a KM-Navigation-iView using layout set for NewsBrowser?
Regards
Kay-Arne
Message was edited by: Kay-Arne S. AarlieHi Kay-Arne,
A namespace defines a system area in which a property (defined by a property ID) is allowed to exist only once. So for your own predefined properties you should use an own namespace in order to be able to use a Property ID that is already available in another namespace. Check this link for more info:
http://help.sap.com/saphelp_nw04/helpdata/en/1a/9a4a3b80f2ec40aa7456bc87a94259/frameset.htm
In the Property Definition you later use the Namespace Alias. This alias (with ":PropertyID") you would also use in the LayoutSet Parameter mentioned above.
Hope this clarify things ,
Robert -
Installing oracle ops center with a Customer-Managed Database.
Hi Everyone,
I am trying to install oracle ops center with a Customer-Managed Database.
I followed this document http://docs.oracle.com/cd/E27363_01/doc.121/e25139.pdf
but I fail.
this is the error I get
Executing job: jobs/40installOracle.pl --install --remoteDBprops=/var/tmp/RemoteDBProps.txt
40installOracle.pl Job Start = Wed Aug 6 11:16:25 2014
looking for props file: /mnt/xvmoc_full_bundle/./Linux_i686/Product/installer/scripts/localOracleConfig.propertieslooking for alter storage file: /mnt/xvmoc_full_bundle/./Linux_i686/Product/installer/scripts/alterStorage.sqlRestarting install at state=done_install_ic
Skipping Step:PrepOraDB because currentState=done_install_ic
Skipping Step:Install IC because currentState=done_install_ic
Error: Failed to get a database connection: Connection refused
satadm: ERROR: --- Failed to verify database
Cannot verify remote database
Please fix the problem and then try this step again.
For a full log of the failed install see the file: /var/tmp/installer.log.28153.
t. Try this step again (correct the failure before proceeding)
x. Exit
this is my RemoteDBProps.txt
mgmtdb_appuser=OPSCENTER
mgmtdb_password=xxxxxxxx
mgmtdb_roappuser=OPSCENTER_RO
mgmtdb_ropassword=xxxxxxx
mgmtdb_dburl=jdbc:oracle:thin:@192.168.1.100:1521/oem
I tested the connection to the sql using OPSCENTER and is working fine.
What am I doing wrong?
kind regards
Albert BoqoHi Albert,
which Version of remote DB do have installed ?
As the error indicates that the error say sqlpplus can't connect to it.
Is the Oracle listener running for port 1521 ?
Error: Failed to get a database connection: Connection refused
satadm: ERROR: --- Failed to verify database
example to verify the status:
/export/home/oracle/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl status
and what is ../oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
configured is these same port/hostname as in RemoteDBProps.txt
Regards
Klaus M
Maybe you are looking for
-
No service for system in Integration Directory
Hi, i already checked SDN and OSS Note 940313. We want to send IDoc from System to XI. Therefore sender gets "No service for system SAPPSI, client 010 in Integration Directory" Thats because IDoc-Adapteris not able to identify SAPPSI. Well this Port
-
Electric Boogaloo sheets 1+2
Q1: i) A wine shop allows customers to only buy wine in packages containing 3, 9 or 12 bottles. Write a method that accepts an integer (num) as a parameter and decides whether or not it is possible to buy num bottles of wine at the shop. Your method
-
hey gurus in my database we have some materialize views . and some of them are using clouse REFRESH COMPLETE and some are USING REFRESH FAST.my point of concern is " for a fast refresh we have to create mat. view logs".how can i check what are log ex
-
Does Adobe still carry Dreamweaver 8 and other studio 8 products on thier server. If so can somebody give me a url to the download location.
-
Hi , Can anyone pls help me to find out roles assigned to particular user . In Su01 transaction we can viewdata for particular user . I need some function module or table which gives / reads information of roles assigned to particular user . Thanks ,