Hi all,

If I set a fulltext search field, I can find the nodes with files containing the text I'm looking for.
My problem is : when my search retrieves a node and the node is linked to several text files, I don't know which files contains the text I searched for. I know there is a matching but I don't know where.

The module looks for file fields and append the contents of all the files related to a node in an indexed text field in SolR. When it's done, you no longer know which part of the indexed field is related to which file.

I don't have an extended knowledge of solR or Search Api to solve to problem.
The way I see it, we need to obtain a indexed structure that allows the fulltext search (of search api) to return the name of the file that matches the string we searched for. So instead of aggregating the content of each file, we need to separate it.
Or we can also keep one aggregated field and insert tags between each content (something like "[filename:example1]texttexttext[filename:example2]texttextext") but then I don't know how to retrieve the results when doing a fulltext search...

Comments

BarisW’s picture

Issue summary: View changes

I'm very curious if you managed to find a solution. I'm having exact the same issue. It would be awesome if the snippet could include the name of the file it was found in.

ginorodrigues’s picture

Also very interested in a solution for that. This is the only requirement left out of many magic things the module already solves.

izus’s picture

hi guys,
can you please provide a patch if you succeeded to have one.
i'll be happy to review some code and merge it
Thanks

grimreaper’s picture

Hello,

I think we can close this issue and mark it as duplicate of #2134163 (even if the creation time of both issues would suggest the opposite...)

izus’s picture

Status: Active » Closed (duplicate)
mchelen’s picture

Status: Closed (duplicate) » Active

Is this really a duplicate? #2134163: Add the snippet to the search result describes an issue where the snippet is not returned at all. However this issue is about when the snippet is returned successfully, but there is no way to tell which file the snippet is from.

nishruu’s picture

I don't think it's a duplicate either.
Sorry folks but I remember giving up on this.

I have a better understanding of Search Api now, so maybe I'll give it a try again.

izus’s picture

Status: Active » Closed (won't fix)

Closing due to lack of activity.
If someone is still working on this issue, Please reopen it.
If you have a patch to suggest for this, please set the status to "Needs review" after uploading the patch
Thanks