GSA: Exclude multiple files using as_filetype - google-search-appliance

I need to exclude multiple file types(ppt,pdf,doc) from my results
I have prepared URL parameter
&as_filetype=pdf,ppt$&as_ft=e
This is not working. Also if I want to exclude files like ppt, pptx, pptm is ppt$ correct?

I would recommend you do this at the collection level.
Log into your Search Appliance, go to Index and then Collections. Click on the Edit link next to the Collection you wish to exclude these files from.
In the box titled "Do Not Include Content Matching the Following Patterns" add the following:
.ppt$
.pdf$
.doc$
These regex patterns that will tell the GSA to exclude and documents ending with .ppt, .pdf and .doc. You can add other file types as you see fit.
HTH

Related

Can files be deleted in a folder if they don't contain a specific word using Power Automate?

I currently have a folder which has photos dumped into it, I am looking to delete all files that do not contain a specific word (which is present in all file names in which I want to keep).
I am hoping this can be done with power automate as there is 100's of photos and I want to improve its efficiency.
I look forward to learning from somebody!
Image below, it seems the flow ran successfully.
enter image description here
You could use a Get files (properties only) action and use a filter array afterwards. In the filter array you could check if the Name field does not contain your keyword.
After that you can loop through the results of the filter array and delete the files based on the {Identifier} field.
Below is an example of that approach
Test it properly, because you are deleting files. Otherwise restore from the first or second stage recycle bin ;)

How to replace/remove tag in multiple csproj files

Is it possible to remove tag from multiple csproj files (e.g. NuGetPackageImportStamp) by using search and replace functionality?
Actually Notepad++ has 'Find in files' functionality to replace in files in the selected location. It is possible to insert filter, use regex...
Sorry for bothering. I didn’t even think to look there.

How to show redundant docs on multiple pages in read the docs

In our read the docs project we have a use case where we need to show some specific docs on multiple pages in the same version of docs. As of now, we do this either by one of the following ways
Copy-pasting the content to each page's rst file
Write it in one of the concerned files with a label and use :std:ref: in rest of the files to redirect it to the main file
I would want to achieve something like writing content only in one file and then showing it (without any redirection for user) in each of the files. Is it possible?
Use the include directive in the parent file.
.. include:: includeme.rst
Note that the included file will be interpreted in the context of the parent file. Therefore section levels (headings) in the included file must be consistent with the parent file, and labels in the included file might generate duplicate warnings.
You can use for this purpose the include directive.
Say that you write the text in dir/text.rst.
The following will include in other documents:
..include :: /dir/text.rst
where the path is either relative (then, with no slash) or absolute which is possible in sphinx (doc)
in Sphinx, when given an absolute include file path, this directive
takes it as relative to the source directory

Using Visual Studio's 'Find', is it possible to exclude specific files from the search?

Let's say i refactored some code in my huge solution, now i want to be sure that there are no occurencies of my old code (including specific words in strings and so one).
Problem is, that i have a huge, automatically built file (imagine something like a 'compiled' app.js), which is allowed to contain string values of my old code.
With the 'Find' functionallity of Visual Studio, is it possible to skip this specific file?
One possible way I could think off is Look at these file types field present in Find and Replace (Shortcut: Ctrl + Shift + F).
You could specify the file types with extensions or/and names. You could use multiple names separated by a semicolon.
Ex: Say you want to search in all XAML files & all CS files starting with A. You would enter this in the Look at these file types field: *.xaml;A*.cs
If you simply want to ensure that your only matches are in that one file, you can check "Display file names only" option in "Find in Files", and verify that there is only that file name in the result pane.

Include only certain file types when searching in Visual Studio

Often when I want to search through my code in Visual Studio, I know the thing I'm looking for is in some C# code. However, as I've used the same variable name in a JavaScript file, I have to wade through all those search results too. This gets even worse when the text I'm looking for is also used in a third-party JavaScript library that we've brought into the project: this can result in hundreds of search results.
To compound things, our designers include HTML mock-ups of the pages in the same project, so I often find I'm hitting loads of search results in there too.
I guess what I really want is to see results in my .cs, .aspx, and .ascx files, but not .js or .htm.
Is there any way to do any of the following:
Search only in files of a particular type (search only .cs files).
Search only in files of any of a given set of types (search only .cs, .aspx and .ascx files).
Search in all file types except a particular type or types (search everything except .js).
I suspect not, in which case is there any crafty way of working around this?
In the Find in Files dialog (Ctrl+Shift+F), there should be a field called Find Options. You should be able to enter the extensions of fields you want to search in a field in this dialog:
*.cs; *.aspx; *.ascx;
Instead of Ctrl + F, I think it is Ctrl + Shift + F which gives you the choice to specify file types, you wish to look into.
You can choose file types from default or type your own. Regular expressions available for complex search.
Another way to limit file searches is by only choosing certain folder sets.
I like to exclude js files by using the following search:
*.a*;*.cs*;
Most of the times, I end up searching for stuff in aspx, cs, cshtml files so this is quite helpful.
Notice how I use *.cs* instead of *.c* since the latter would select jquery custom files such as jquery.custom1234.js (which I usually use in most of my projects), of course if you don't you could just use *.c*.
In the Find dialog box, go to "find options->Look at these file types".
Type in you own string, eg, *.cs, *.aspx, *.ascx. The click the "find all" button.

Resources