با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
هنگام استفاده از کنسول Firebase می توانید اقدامات زیر را در Cloud Firestore انجام دهید:
مشاهده، افزودن، ویرایش و حذف داده ها.
Cloud Firestore Security Rules ایجاد و به روز کنید.
فهرست ها را مدیریت کنید
نظارت بر استفاده
مشاهده داده ها
میتوانید تمام دادههای Cloud Firestore خود را در کنسول Firebase مشاهده کنید. از برگه Cloud FirestoreData ، روی یک سند یا مجموعه کلیک کنید تا داده های تو در تو در آن مورد باز شود.
یک مسیر مشخص را باز کنید
برای باز کردن یک سند یا مجموعه در یک مسیر خاص، از دکمه ویرایش مسیرcreate :
فیلتر کردن اسناد در مجموعه
برای فیلتر کردن اسناد لیست شده در یک مجموعه، از دکمه لیست فیلترfilter_list استفاده کنید.
اسناد اجدادی موجود نیست
یک سند می تواند وجود داشته باشد حتی اگر یک یا چند اجداد آن وجود نداشته باشند. به عنوان مثال، سند در مسیر /mycoll/mydoc/mysubcoll/mysubdoc میتواند وجود داشته باشد حتی اگر سند اجدادی /mycoll/mydoc وجود نداشته باشد. نمایشگر داده Cloud Firestore سند اجدادی را که وجود ندارد را به صورت زیر نمایش می دهد:
در فهرست اسناد مجموعه، شناسه مدارک اسناد اجدادی که وجود ندارند، مورب هستند.
در پانل اطلاعات یک سند اجدادی که وجود ندارد، بیننده داده به عدم وجود سند اشاره می کند.
داده های پرس و جو
می توانید اسناد را در برگه Query builder صفحه Cloud Firestore Data جستجو کنید.
برای پرس و جو از یک مجموعه واحد، مجموعه را انتخاب کنید. در قسمت متن، مسیری به مجموعه وارد کنید.
گروه مجموعه را انتخاب کنید تا همه مجموعهها را با یک شناسه پرس و جو کنید. در قسمت گروه مجموعه ، شناسه گروه مجموعه را وارد کنید.
جدول به طور خودکار اسنادی را از مجموعه یا گروه مجموعه مشخص شده نمایش می دهد.
برای فیلتر کردن مجموعه اسناد برگشتی، روی Add to Query کلیک کنید. به طور پیش فرض، Query Builder یک عبارت WHERE اضافه می کند. می توانید این بند را با استفاده از قسمت های کشویی و متنی تغییر دهید یا به یکی از بندهای موجود دیگر تغییر دهید. برای ادامه ساخت پرس و جوهای پیچیده تر، روی افزودن به پرس و جو کلیک کنید.
برای حذف یک عبارت جستجو، روی دکمه حذف آن cancel کلیک کنید. برای حذف تمام بندهای پرس و جو، روی پاک کردن کلیک کنید.
برای بازیابی نتایج از پایگاه داده خود روی Run کلیک کنید.
الزامات و محدودیت های پرس و جو
همانطور که از Query Builder استفاده می کنید، الزامات و محدودیت های زیر را برای پرس و جوها در نظر داشته باشید.
همه پرس و جوها باید توسط یک یا چند نمایه پشتیبانی شوند. اگر پایگاه داده نتواند نمایه ای برای پشتیبانی از پرس و جو پیدا کند، خطایی را برمی گرداند که حاوی پیوندی برای ساخت ایندکس مورد نیاز است.
بندهای ORDER BY باید با فیلدهای بندهای WHERE مطابقت داشته باشند و به همان ترتیب باشند. به طور پیش فرض، نتایج بر اساس شناسه سند مرتب می شوند. اگر با هر فیلد دیگری با چیزی غیر از برابری ( == ) فیلتر می کنید، یک عبارت ORDER BY برای آن فیلد اضافه کنید.
عبارت های پرس و جو محدوده ( < , <= , > , >= ) و مساوی ( != , not-in ) باید همه در یک فیلد فیلتر شوند.
در Cloud Firestore ، داده ها را در اسناد ذخیره می کنید و اسناد خود را در مجموعه ها سازماندهی می کنید. قبل از شروع به افزودن داده، درباره مدل داده Cloud Firestore اطلاعات بیشتری کسب کنید.
می توانید اسناد و مجموعه ها را از کنسول Firebase اضافه، ویرایش و حذف کنید. برای مدیریت داده های خود، تب Data را در بخش Cloud Firestore باز کنید:
داده ها را اضافه کنید
روی افزودن مجموعه کلیک کنید، سپس نام مجموعه خود را وارد کرده و روی Next کلیک کنید.
شناسه سند خاصی را وارد کنید یا روی شناسه خودکار کلیک کنید، سپس فیلدهایی را برای دادههای سند خود اضافه کنید.
روی ذخیره کلیک کنید. مجموعه و سند جدید شما در نمایشگر داده ظاهر می شود.
برای افزودن اسناد بیشتر به مجموعه، روی افزودن سند کلیک کنید.
ویرایش داده ها
روی یک مجموعه کلیک کنید تا اسناد آن را مشاهده کنید، سپس روی یک سند کلیک کنید تا فیلدها و زیر مجموعه های آن را مشاهده کنید.
روی یک فیلد کلیک کنید تا مقدار آن را ویرایش کنید. برای افزودن فیلدها یا زیر مجموعهها به سند انتخابی، روی افزودن فیلد یا افزودن مجموعه کلیک کنید.
داده ها را حذف کنید
برای حذف یک مجموعه:
مجموعه ای را که می خواهید حذف کنید انتخاب کنید.
روی نماد منو در بالای ستون اسناد کلیک کنید، سپس روی حذف مجموعه کلیک کنید.
برای حذف یک سند یا تمام فیلدهای آن:
سندی را که می خواهید حذف کنید انتخاب کنید.
روی نماد منو در بالای ستون جزئیات سند کلیک کنید. حذف سند یا حذف فیلدهای سند را انتخاب کنید.
با حذف یک سند، تمام داده های تودرتو در آن سند، از جمله هر مجموعه فرعی، حذف می شود. با این حال، حذف فیلدهای یک سند، مجموعه های فرعی آن را حذف نمی کند.
برای حذف یک فیلد خاص در یک سند:
سند را برای مشاهده فیلدهای آن انتخاب کنید.
روی نماد حذف در کنار فیلدی که میخواهید حذف کنید کلیک کنید.
Cloud Firestore Security Rules مدیریت کنید
برای افزودن، ویرایش و حذف Cloud Firestore Security Rules از کنسول Firebase، به تب Rules در بخش Cloud Firestore بروید. درباره تنظیم و سفارشی کردن قوانین بیشتر بیاموزید.
فهرست ها را مدیریت کنید
برای ایجاد نمایههای جدید برای پرسشهای خود و مدیریت فهرستهای موجود از کنسول Firebase، به تب Indexes در بخش Cloud Firestore بروید. درباره مدیریت ایندکس ها بیشتر بیاموزید.
نظارت بر استفاده
برای نظارت بر استفاده از Cloud Firestore ، برگه Cloud FirestoreUsage را در کنسول Firebase باز کنید. از داشبورد برای سنجش میزان استفاده خود در دوره های زمانی مختلف استفاده کنید.
تاریخ آخرین بهروزرسانی 2025-09-04 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-09-04 بهوقت ساعت هماهنگ جهانی."],[],[],null,["\u003cbr /\u003e\n\nYou can perform the following actions on Cloud Firestore when using the\n[Firebase console](https://console.firebase.google.com/project/_/firestore/data):\n\n- View, add, edit, and delete data.\n- Create and update Cloud Firestore Security Rules.\n- Manage indexes.\n- Monitor usage.\n\nView data\n\nYou can view all your Cloud Firestore data in the Firebase console. From\nthe Cloud Firestore\n[**Data** tab](https://console.firebase.google.com/project/_/firestore/data),\nclick on a document or collection to open the data nested within that item.\n\nOpen a specific path\n\nTo open a document or collection at a specific path, use the **Edit path**\nbutton create:\n\nFilter documents in a collection\n\nTo filter the documents listed in a collection, use the **Filter list** button\nfilter_list.\n\nNon-existent ancestor documents\n\nA document can exist even if one or more its ancestors don't\nexist. For example, the document at path\n`/mycoll/mydoc/mysubcoll/mysubdoc` can exist even if the ancestor document\n`/mycoll/mydoc` does not. The Cloud Firestore data viewer displays\nnon-existent ancestor document as follows:\n\n- In a collection's list of documents, the document IDs of non-existent ancestor documents are *italicized*.\n- In a non-existent ancestor document's information panel, the data viewer points out that the document does not exist.\n\n| **Warning:** Even though non-existent ancestor documents appear in the console, they do not appear in queries and snapshots. You must create the document to include it in query results.\n\nQuery data\n\nYou can query for documents in the ***Query builder*** tab of the\nCloud Firestore Data page.\n\n1. [Go to the Cloud Firestore Data page](//console.firebase.google.com/project/_/firestore/data)\n\n2. Click the **Query builder** tab.\n\n3. Select a [query scope](./query-data/index-overview#query_scopes).\n\n Select ***Collection*** to query a single collection. In the text field,\n enter a path to a collection.\n\n Select ***Collection group*** to query all collections with the same\n ID. In the ***Collection group*** field, enter a collection group ID.\n\n The table will automatically display documents from the specified collection\n or collection group.\n4. Click ***Add to query*** to filter the returned set of documents. By default,\n the Query Builder adds a `WHERE` clause. You can\n modify this clause using the dropdowns and text fields or change to one\n of the other available clauses. To continue building more complex\n queries, click ***Add to query***.\n\n To remove a query clause, click it's remove button\n cancel. To remove all query clauses,\n click ***Clear***.\n | **Note:** Queries must meet Cloud Firestore requirements and limitations for queries. Otherwise, the query fails and the page returns an error that describes why the query failed.\n5. Click ***Run*** to retrieve results from your database.\n\nQuery requirements and limitations\n\nAs you use the Query Builder, keep in mind the following requirements and\nlimitations for queries.\n\n- All queries must be supported by one or more indexes. If the database cannot\n find an index to support the query, it will return an error that contains a\n link to build the required index.\n\n- `ORDER BY` clauses must match the fields in the `WHERE` clauses and come in\n the same order. By default, results are ordered by document ID. If you filter\n by any other field with anything other than an equality (`==`), add an\n `ORDER BY` clause for that field.\n\n- Range (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`) and not equals (`!=`, `not-in`) query clauses\n must all filter on the same field.\n\nFor additional limitations, see\n[Query limitations](./query-data/queries#query_limitations).\n\nManage data\n\nIn Cloud Firestore, you store data in documents and organize your\ndocuments into collections. Before you start adding data, learn more about the\n[Cloud Firestore data model](./data-model).\n\nYou can add, edit, and delete documents and collections from the Firebase\nconsole. To manage your data, open the [**Data** tab](https://console.firebase.google.com/project/_/firestore/data)\nin the **Cloud Firestore** section:\n| **Note:** Read, write, and delete operations performed in the console count towards your Cloud Firestore usage. Some console activities, like viewing a document containing multiple fields, may generate several operations.\n\nAdd data\n\n1. Click **Add collection** , then enter your collection name and click **Next**.\n2. Enter a specific document ID or click **Auto ID**, then add fields for the data in your document.\n3. Click **Save**. Your new collection and document appear in the data viewer.\n4. To add more documents to the collection, click **Add document**.\n\nEdit data\n\n1. Click on a collection to view its documents, then click on a document to view its fields and subcollections.\n2. Click on a field to edit its value. To add fields or subcollections to the selected document, click **Add field** or **Add collection**.\n\nDelete data\n\nTo delete a collection:\n\n1. Select the collection you want to delete.\n2. Click the menu icon at the top of the documents column, then click **Delete collection**.\n\nTo delete a document or all of its fields:\n\n1. Select the document you want to delete.\n2. Click the menu icon at the top of the document details column. Select **Delete document** or **Delete document fields**.\n\nDeleting a document deletes all of the nested data in that document, including\nany subcollections. However, deleting a document's\nfields does not delete its subcollections.\n\nTo delete a specific field in a document:\n\n1. Select the document to view its fields.\n2. Click the delete icon beside the field you want to delete.\n\nManage Cloud Firestore Security Rules\n\nTo add, edit, and delete Cloud Firestore Security Rules from the Firebase console, go to\nthe [**Rules** tab](https://console.firebase.google.com/project/_/firestore/rules)\nin the **Cloud Firestore** section. Learn\nmore about [setting up and customizing rules](./security/get-started).\n\nManage indexes\n\nTo create new indexes for your queries and manage existing indexes from the\nFirebase console, go to the\n[**Indexes** tab](https://console.firebase.google.com/project/_/firestore/indexes)\nin the **Cloud Firestore** section. Learn more about [managing indexes](./query-data/indexing).\n\nMonitor usage\n\nTo monitor your Cloud Firestore usage, open the Cloud Firestore\n[**Usage** tab](https://console.firebase.google.com/project/_/firestore/usage)\nin the Firebase Console. Use the dashboard to gauge your usage\nover different time periods."]]