Comments (8)
Thanks a ton @wobba appreciated your efforts.
We tried propertiesMetadata() method and following are the behavior we are getting:
- Content does not appear in the Search results for classic pages.
- For modern pages, the behavior is even more baffling. It actually indexes content with a webpart ID as a prefix to the Search text. The user would then need to enter a search string that looks like this: “{WebpartID}SearchText”.
Please let us know your valuable comments.
from sp-dev-fx-webparts.
@patmill any input on this?
from sp-dev-fx-webparts.
Hi Mikael - sorry for not responding here. I was looking at the sp-dev-docs issues list.
So the current implementation of this should result in all of the webpart content being in the index with the rest of the page content. The goal being primarily to surface all of the user content in the full text index, rather than having arbitrary crawled / managed properties. It is something we could consider in the future, but would require a fair chunk of work. I'll bubble up the request though. Thanks,
from sp-dev-fx-webparts.
Thank you @patmill. But it still doesn't make sense that all web part properties are appended to the Description managed property upon indexing, or? So some work is already in place here ;)
I do get the point of having custom properties as part of the fti, but using this as a way to add metadata instead of doing content types seems to make a whole lot of sense to me. But at least I know how the current implementation works.
from sp-dev-fx-webparts.
I am facing slightly different issue in which I want SPFX webpart content to be crawled and popup in search result but it doesn't. Any idea how I can make it work or it is something that current implementation does not support? Please provide valuable inputs... @wobba @patmill
from sp-dev-fx-webparts.
@Divyeshkotadia by adding the function in my question - propertiesMetadata(), you should be able to specify which web part properties are added to the index. If you want the rendered html crawled, you need to add that as part of a webpart property.
from sp-dev-fx-webparts.
@wobba thanks for your prompt response.. I have tried what you mentioned but it does not work out... Is it possible for you to share sample code.. Secondly will it work on classic pages as well because my implementation is used on those pages and content that user has entered should be searchable through search. Let me know if you don't relate any part of my query...
Thank you very much...Cheers!!!
from sp-dev-fx-webparts.
@Divyeshkotadia Here's a sample React part:
`
import * as React from 'react';
import * as ReactDom from 'react-dom';
import { Version } from '@microsoft/sp-core-library';
import {
BaseClientSideWebPart,
IPropertyPaneConfiguration,
PropertyPaneTextField,
IWebPartPropertiesMetadata
} from '@microsoft/sp-webpart-base';
import * as strings from 'puzzlepartMetadataStrings';
import PuzzlepartMetadata from './components/PuzzlepartMetadata';
import { IPuzzlepartMetadataProps } from './components/IPuzzlepartMetadataProps';
import { IPuzzlepartMetadataWebPartProps } from './IPuzzlepartMetadataWebPartProps';
export default class PuzzlepartMetadataWebPart extends BaseClientSideWebPart<IPuzzlepartMetadataWebPartProps> {
public render(): void {
const element: React.ReactElement<IPuzzlepartMetadataProps> = React.createElement(
PuzzlepartMetadata,
{
Keywords: this.properties.Keywords,
Kash: this.properties.Kash
}
);
ReactDom.render(element, this.domElement);
}
protected get dataVersion(): Version {
return Version.parse('1.0');
}
protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
return {
pages: [
{
header: {
description: strings.PropertyPaneDescription
},
groups: [
{
groupName: strings.BasicGroupName,
groupFields: [
PropertyPaneTextField('Keywords', {
label: strings.KeywordsFieldLabel
}),
PropertyPaneTextField('Kash', {
label: "Extra"
})
]
}
]
}
]
};
}
protected get propertiesMetadata(): IWebPartPropertiesMetadata {
return {
'Keywords': { isHtmlString: true },
'Kash': { isHtmlString: true }
};
}
}
`
from sp-dev-fx-webparts.
Related Issues (20)
- The Advanced Comments Box solution did not work for the users with the read access. HOT 4
- react-list-form - React list how to enable edit in People picker field
- RoB Events List HOT 2
- Could not proceed with gulp build in windows node 8.17
- react-personal-greeting - Invalid glob argument HOT 1
- react-display-hierarchy - receiving Cannot find module 'worker_threads' on using gulp bundle
- react-display-hierarchy - issue with workers thread
- react-display-hierarchy issue with workers thread HOT 2
- react-display-hierarchy - package problems
- react-list-search NPM/Gulp issue
- react-page-navigator Question HOT 6
- "MODULE NOT FOUND"
- react-tree-orgchart - facing issue while running webpart HOT 1
- Modern Script Editor Webpart is not working HOT 3
- react-azure-openai-api-stream - HOT 2
- react-script-editor - Component ID exist in another solution HOT 6
- TypeError: Failed to fetch at c when trying to attach files in SPFx HOT 1
- TenantDomain Error HOT 4
- react-calendar-feed - Webpack v5 polyfills error when running gulp bundle
- Issue with adding attachment with same name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sp-dev-fx-webparts.