[Samba] Search in Samba ?

Noel Power nopower at suse.de
Fri Aug 4 08:43:10 UTC 2023

Hi Joachim,

On 03/08/2023 09:51, Joachim Lindenberg via samba wrote:
> Hello all,
> I am wondering when and what is going to happen w.r.t. search. Searching the list, the last question was around April 2020, I also watched the video of Samba XP 2023, but unfortunately that is very unspecific w.r.t. both features and timeline.

First of all thanks for the interest and offers of help. Regarding 
above,  on the linux client side, featurewise I am trying to at least 
provide a cli tool that allow similar simple searches that you can 
perform from windows explorer, that is searching based on type (e.g. 
kind), and/or logical combinations of various properties connected 
together by (and | or | not) logical operations into an expression. A 
freetext phrase can also be passed.

on the server side the plan is to support those same searches (whether 
originating from the simple client or from windows (but in the windows 
case initially targeting those searches produced by explorer)) The 
windows search protocol searches are converted into an 
elasticsearch/opensearch query. Results are similarly converted and 
returned to the client

very simply there is no timeline, this is a project I am working on when 
I can in my spare cycles. As mentioned at the sambaxp presentation there 
is a merge request to get the client side code into samba, this is a 
first step, the client code provides alot of backbone code needed for 
the server implementation. The review request 
https://gitlab.com/samba-team/samba/-/merge_requests/2785 has had some 
minor review but this is a complex protocol and there is alot of code to 
review. I reverted the review request to draft yesterday or the day 
before as I wanted to improve some of the code a bit. I intend to remove 
the draft tag as soon as I can.

> Right now I am running three Samba DCs only plus domain members for authentication only, but no file servers, as to me search and fail-over are the top priorities (in that order). Search does work for me with Windows (desktop or server) including full-text-search
That I don't understand, windows search is windows -> windows and you 
say you have no samba fileservers involved so windows search triggered 
by a windows client against a windows share should work. Can you explain 
how you are searching ? or what is failing
> , fail-over is an issue. With Samba I suppose I could get replication and fail-over via GlusterFS (https://wiki.samba.org/index.php/GlusterFS), but search is unavailable.
> I´d be willing to spend some cycles on testing or documentation. So far I never built Samba myself, but am going to try that.
> Who else is interested and willing to offer something?
I can help to a certain extent with compiling, I believe from further 
messages that you are using Debian/Ubuntu (which I have no experience 
with) but of course with generic build issues I do :-)
> Or what alternatives are around? There might be even value in collecting use cases and alternatives. E.g. I found the question https://superuser.com/questions/1675272/how-do-i-get-windows-10-to-index-mapped-network-drives but the answer only reveals searches by file name or attributes, none providing full-text-search.

That question seems to relate to (non-windows) network drives which of 
course don't implement the windows search service therefore can not 
service the search requests.

When a windows client (or I should say a windows search client) issues a 
search request against the device serving the network share it tries to 
use the windows search protocol, if the device is windows search 
protocol aware (and provides the associated service) the  the search is 
performed on the device itself against the indexed content otherwise it 
searches over the network


More information about the samba mailing list