apostrophe icon indicating copy to clipboard operation
apostrophe copied to clipboard

search result doesn't include values from modules schema

Open dannyblv opened this issue 12 years ago • 13 comments

Hey, the search result is only returning array with id,type,title,slug,publishedAt,lowSearchText etc .. but missing the fields I've added { name: 'short_description', type: 'string', label: 'Short Description' }, { name: 'author_name', type: 'string', label: 'Author name' }

any idea how to make the results to also include these fields ?

thanks!

dannyblv avatar May 04 '14 11:05 dannyblv

please someone ? its my last step on my project.

thanks :)

dannyblv avatar May 11 '14 13:05 dannyblv

+1 on this one, @boutell. @Danny-weebo, where are you adding these projected fields?

jsumnersmith avatar May 11 '14 13:05 jsumnersmith

@jsumnersmith ,I've them under addFields on app.js

dannyblv avatar May 11 '14 13:05 dannyblv

Supposed to work I will look On May 11, 2014 9:29 AM, "Danny-weebo" [email protected] wrote:

@jsumnersmith https://github.com/jsumnersmith ,thanks for you're answer, I've them under addFields on app.js

— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe/issues/116#issuecomment-42770590 .

boutell avatar May 11 '14 13:05 boutell

@boutell - that would be great. +1 on this

etodanik avatar May 11 '14 13:05 etodanik

This schema field, inserted via "addFields" into the instance type of a snippet subclass called "companies", is visible to search:

    {
      name: 'slogan',
      label: 'Slogan',
      type: 'string'
    },

So I will need more specifics.

Is this a snippet subclass index type maybe? A fancy page?

Thanks!

On Sun, May 11, 2014 at 9:40 AM, Danny Povolotski [email protected]:

@boutell https://github.com/boutell - that would be great. +1 on this

— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe/issues/116#issuecomment-42770830 .

*THOMAS BOUTELL, *DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com

boutell avatar May 11 '14 14:05 boutell

it is searchable, but I'm talking about the search result, search (in: views/pages/search.html) dosent include these fields, as I said it only include "id,type,title,slug,publishedAt,lowSearchText,searchSummary,textScore,_edit"

thanks for you're answers!

dannyblv avatar May 11 '14 14:05 dannyblv

Ohhh that's another animal entirely. (:

On Sun, May 11, 2014 at 10:11 AM, Danny-weebo [email protected]:

it is searchable, but I'm talking about the search result, search dosent include these fields, as I said it only include "id,type,title,slug,publishedAt,lowSearchText,searchSummary,textScore,_edit"

thanks for you're answers!

— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe/issues/116#issuecomment-42771464 .

*THOMAS BOUTELL, *DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com

boutell avatar May 11 '14 14:05 boutell

Hmm.

The reason we don't fetch everything is because of performance. We output just a single search results page with no pagination, because our old method of search didn't lend itself well to pagination. Since that contains up to 100 documents we wanted to avoid a performance hit by not fetching too much content most of which will not be shown anyway.

But since skip and limit are supported in the new mongo 2.6 $text search, we could stop limiting the fields, and start fetching the entire document, showing only ten results at a time with our standard pager.

I think that's probably the best resolution of this ticket.

On Sun, May 11, 2014 at 10:29 AM, Tom Boutell [email protected] wrote:

Ohhh that's another animal entirely. (:

On Sun, May 11, 2014 at 10:11 AM, Danny-weebo [email protected]:

it is searchable, but I'm talking about the search result, search dosent include these fields, as I said it only include "id,type,title,slug,publishedAt,lowSearchText,searchSummary,textScore,_edit"

thanks for you're answers!

— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe/issues/116#issuecomment-42771464 .

*THOMAS BOUTELL, *DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com

*THOMAS BOUTELL, *DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com

boutell avatar May 11 '14 14:05 boutell

Alright - where to I put my dirty fingers? I'm trying to resolve this today.

Also how would you like to resolve it to stay bc-ish?

etodanik avatar Jun 01 '14 18:06 etodanik

This got fixed already (:

See recent google group post

A2 search now pulls the whole document, which is why you need to add a pager call to your template. Doesn't do joins.

On Sun, Jun 1, 2014 at 2:10 PM, Danny Povolotski [email protected] wrote:

Alright - where to I put my dirty fingers? I'm trying to resolve this today.

Also how would you like to resolve it to stay bc-ish?

— Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe/issues/116#issuecomment-44784462.

*THOMAS BOUTELL, *DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com

boutell avatar Jun 01 '14 18:06 boutell

You guys are more than awesome! :)

etodanik avatar Jun 01 '14 18:06 etodanik

https://groups.google.com/forum/#!topic/apostrophenow/YwQNi1rgKpc

boutell avatar Jun 01 '14 18:06 boutell