Comments (6)
Currently we don't support nested level fields.
But what's the error you are getting?
from search-source.
I am getting this:
Exception in template helper: TypeError: undefined is not a function
for this code
return UsersSearch.getData({
transform: function(matchText, regExp) {
return matchText.replace(regExp, "<b>$&</b>")
},
sort: {isoScore: -1}
});
At the return matchText.replace line
from search-source.
Okay. I know the issue.
I'll make a fix.
BTW: How do you define fields?
As a fix. Try to send fields without nested fields from the server
On Mon Jan 12 2015 at 4:29:20 PM Gus [email protected] wrote:
I am getting this:
Exception in template helper: TypeError: undefined is not a function
for this code
return UsersSearch.getData({
transform: function(matchText, regExp) {
return matchText.replace(regExp, "$&")
},
sort: {isoScore: -1}
});At the return matchText.replace line
—
Reply to this email directly or view it on GitHub
#4 (comment)
.
from search-source.
In fact, I was doing things in a wrong way... Sorry to have disturbed.
My mistake was to define the emails field and not the emails.address like it should be.
The package is fine, I can search users on any field I want (nested or not)
I define my fields like this:
UsersSearch = new SearchSource('users',
['emails.address', 'profile.firstName', 'profile.lastName'],
options);
Thank you for this package, it is the best meteor search solution I saw so far (fast and easy to implement).
from search-source.
Hi! I'm having this problem, can you tell me how you solved it @elGusto ?
I have a field called profile.fullName and it does not works with the transformation function...
I'm using ES backend
SearchSources.userSearch = new SearchSource('userSearch',
['profile.fullName', 'username'],
SEARCH_OPTIONS);
ps: username works just fine
from search-source.
@rafaelcorreiapoli I don't recall, but judging from the thread, it was an error from me. Like I was using 'emails.address' instead of 'emails.$.adress' or something similar.
Sorry I cannot be of more help...
from search-source.
Related Issues (20)
- how to search on multiple collection? HOT 6
- Exception in delivering result of invoking 'search.source': TypeError: Cannot read property 'data' of undefined HOT 1
- search-source with meteor 1.2: Exception while invoking method 'search.source' ReferenceError: check is not defined HOT 1
- Need to add check and ejson package dependencies. HOT 5
- Reactive getData() causes helper to be executed 3 times
- REQUEST: Exclude defined word from search result
- astronomy conflict
- Searching for other value types than strings HOT 2
- Question: Search in _id mongoDB
- Exception in delivering result of invoking 'search.source' HOT 7
- Integration with reywood:publish-composite package HOT 2
- Exception while invoking method 'search.source' Error: Match error: Failed Match.OneOf or Match.Optional validation HOT 2
- Sub packages not added automatically HOT 1
- invoking 'search.source': Error: Internal server error [500]...Help please! HOT 5
- Link to meteorhacks article not working in the docs HOT 3
- package.js:3:13: Unterminated string constant (3:13)
- Transform highlighting doesn't work on _id HOT 1
- Transform method not hit in .getData HOT 1
- Searching a sub array and only outputting the matching data
- Allow search for a term with multiple words HOT 1
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 search-source.